| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
optimization options
Fixes: #14603
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This makes "meson setup --reconfigure" behave quite literally the same as
"meson configure" + "meson setup"; except that saving coredata and
cmdline file is delayed until the setup succeeds.
Fixes: #14575
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Prepare to reuse the logic in "meson setup --reconfigure".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This was the pre-refactoring implementation of `-D`, which is now unused.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
For compatibility with Autotools, CFLAGS is added to the linker command
line if the compiler acts as a linker driver. However, this behavior
was lost in commit d37d649b0 ("Make all Meson level options overridable
per subproject.", 2025-02-13).
The issue is that (for example) c_link_args is stored in env.options, and
from that point on it is treated as a machine-file option. This includes
not being able to override it in compilers.get_global_options:
- initialize_from_top_level_project_call places it in pending_options
- add_lang_args passes the right value to add_compiler_option
- add_compiler_option calls add_system_option_internal
- add_system_option_internal fishes the value out of pending_options
and ignores what get_global_options provided.
Instead, store the putative values of the compiler options coming from
the environment in a separate dictionary, that is only accessed by
get_global_options. This way it never appears in pending_options, and
also there is no internal *_env_args variable anymore.
Fixes: #14533
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Make space for moving the larger comment about *_env_args, which will be before
the for loop once *_env_args is removed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
On Windows, os.execv spawn the process in background and returns 0.
Therefore, it prevents devenv to return proper exit code from the
called process. (see https://github.com/python/cpython/issues/63323
for reference.)
The solution is to call subprocess.run instead, on Windows, at the
price of keeping the meson python process alive while the devenv
subprocess runs.
|
|
|
|
"rustdoc --test" relies on running host binaries, and has no way of wrapping
them with Meson's exe_wrapper. Just skip the doctests in that case.
Fixes: #14583
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Document that "rustdoc" is a useful key for the `[binaries]` section.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes a regression introduced in commit d37d649b08b8 "Make all Meson level
options overridable per subproject." This change results in every file
printing the warning "cl : Command line warning D9002 : ignoring unknown
option '/std:vc++14'"
Now that "get_option_..." is called before overwriting the option (instead
of after), we have to operate on compiler options, not meson options.
There is no such compiler option as /std:vc++14 (the meson option vc++xx is
split into /std:c++xx for the C++ standard version, and a separate flag
that enables Microsoft extensions). Remove the mapping from c++14 to
vc++14.
|
|
This is already done for bz2 and lzma, but even gzip is not always available
in a minimal Python installation. For example, this happens when building
Python from source without having zlib available.
|
|
|
|
Sync with the English version
|
|
Replace optlist2optdict with a convertor. However, while default_options
should use OptionKeys like it did before the option refactoring,
override_options keeps using strings.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
A convertor will *accept* something that is definitely a TYPE_var; but the
output can be any Python object that the evaluation function desires.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Allow OptionStringLikeDict to use non-string data types, and use it
as much as possible instead of string-valued dictionaries.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Do not go through string first and OptionKey second. Just pass the OptionKeys
down.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This makes it possible to remove all list cases from first_handle_prefix
and callees.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Make the validators accept any object since that is where the type
checking is done. The same is true for listify_array_value, which
also performs type checking.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
It is assigned to invoker_method_default_options for clarity, use that name
everywhere.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Since opt.deprecated is a dictionary with string keys, the lookup must use
str() around the user-provided value; with some care because booleans
will be the meson-ic 'true' and 'false' instead of Python's 'True' and
'False'.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Apply the default_library=... default after the default options have been
converted to a dictionary, to avoid having to deal with all the possible types
of the default_options keyword argument.
Fixes: #14532
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Always use a dictionary (even though later OptionStore will convert it back to list
for hackish historical reasons) to make it easy to apply overrides. Long term
we probably want OptionStore to not know about T.List[str] at all, anyway.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
No code changes, just making mypy annotations truthful.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Something like
subproject('sub', default_options: ['sub2:from_subp=true'])
will cause an assertion failure due to "key.subproject is None"
obviously being false. Just support this, since it's easy to do so.
|
|
Fixes: #14528
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
In this case, self.raw_link_args is None.
Fixes #14534.
|
|
|
|
Fixes #14270.
|
|
|
|
By default we point to the start of the most recent token we parsed.
This is used when erroring out on parser issues, to print the line that
caused the error, with a pointer to where we were when we got the error.
In this particular case, the pointer pointed to the start of the last
token we successfully parsed (col), but was not updated if we hit a
token we didn't understand at all. Instead use a pointer to the
unrecognized token itself.
Fixes: https://github.com/mesonbuild/meson/issues/14415
|
|
Fixes #14415
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
See the way that it is created:
dir_node = assign(dir_var, function(include_directories, tgt.includes))
sys_node = assign(sys_var, function(include_directories, tgt.sys_includes, {is_system: True}))
inc_node = assign(inc_var, array([id_node(dir_var), id_node(sys_var)]))
Due to incorrect documentation, commit 1f4bb3737 ("modules/cmake: Make fully type
safe", 2025-04-02) added an incorrect assertion. Fix both.
Fixes: #14530
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This reflects the upstream project, which dropped the + in 2020
|
|
This removes a lot of projects from our list of users, unless they are
very notable.
|
|
|
|
Some of the projects listed are part of larger umbrella organizations,
which have many project using Meson. Instead of listing every single
project from them, list the organization itself and a couple of major
projects (if we have any listed) from those organizations.
|