summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-05-15unittests: add minimal coverage of --buildtype=customPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-15options: "custom" buildtype does not trigger changes in debug or ↵Paolo Bonzini
optimization options Fixes: #14603 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-15add test case for setting options from reconfigurePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-15msetup: update coredata if options are passed together with --reconfigurePaolo Bonzini
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>
2025-05-15mconf: extract option processing to CoreData.set_from_configure_commandPaolo Bonzini
Prepare to reuse the logic in "meson setup --reconfigure". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-15mconf: remove dead functionPaolo Bonzini
This was the pre-refactoring implementation of `-D`, which is now unused. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-15unittests: add test for CFLAGS in linker command linePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-15options: restore special behavior of CFLAGS vs. c_argsPaolo Bonzini
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>
2025-05-15environment: move a comment aroundPaolo Bonzini
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>
2025-05-15environment: split list of important environment variables to a constantPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-14Skip gettext extractor on macos because it is unstableCharles Brunet
2025-05-14devenv: do not use os.execv on WindowsCharles Brunet
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.
2025-05-14docs: gender neutral pronouns for "the user"nasso
2025-05-13rust: skip doctests when build machine cannot run host binariesPaolo Bonzini
"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>
2025-05-13cross: add rustdoc to ubuntu-armhf toolchainPaolo Bonzini
Document that "rustdoc" is a useful key for the `[binaries]` section. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-13cpp: Fix cpp_std=vc++14Peter Harris
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.
2025-05-11mdist.py: Import gzip only when neededHenrik Lindström
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.
2025-05-11compilers/rust: fix syntax of has_argument checksDaniel Foster
2025-05-08Update Getting-meson_zh.mdDaniel
Sync with the English version
2025-05-07interpreter: reintroduce a convertor for override_options and default_optionsPaolo Bonzini
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>
2025-05-07interpreterbase: allow any return type for convertorsPaolo Bonzini
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>
2025-05-07options: store augments as OptionKeysPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-07options: do not go back to list representationPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-07options: support non-string data types in more placesPaolo Bonzini
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>
2025-05-07ast: clean up handling of default optionsPaolo Bonzini
Do not go through string first and OptionKey second. Just pass the OptionKeys down. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-07options: early convert project default options to dictionaryPaolo Bonzini
This makes it possible to remove all list cases from first_handle_prefix and callees. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-07options: fix type for OptionStore.augmentsPaolo Bonzini
2025-05-07options: tighten types for validating optionsPaolo Bonzini
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>
2025-05-07options: machine_file_options keys are always OptionKeysPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-07interpreter: rename default_project_optionsPaolo Bonzini
It is assigned to invoker_method_default_options for clarity, use that name everywhere. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-07options: fix "deprecated" with dictionary argument and non-string typesPaolo Bonzini
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>
2025-05-06test cases: add testcase for setting options from superprojectPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-06test cases: cover passing default_options together with static: truePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-06interpreter: allow passing default default_options to do_subprojectPaolo Bonzini
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>
2025-05-06interpreter: convert subproject default options to dictionaryPaolo Bonzini
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>
2025-05-06options: fix types for initialize_from_subproject_callPaolo Bonzini
No code changes, just making mypy annotations truthful. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-06options: allow setting subproject options in subproject() callPaolo Bonzini
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.
2025-05-06options: set subproject options as augmentsPaolo Bonzini
Fixes: #14528 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-06dependencies/python: Fix Framework Python when pkg-config is installedDaniele Nicolodi
In this case, self.raw_link_args is None. Fixes #14534.
2025-05-06dependencies/python: Replace non-breakable space with spaceDaniele Nicolodi
2025-05-06Add license keyword to pkgconfig generateCharles Brunet
Fixes #14270.
2025-05-06do not use len to check emptynessCharles Brunet
2025-05-05parser: update position when reporting lexer errors for unrecognized tokenEli Schwartz
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
2025-05-05more explicit error message for unrecognized lexer tokenCharles Brunet
Fixes #14415
2025-05-05test casees: add test for cmake_proj.include_directoriesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-05cmake: include_directories() returns an arrayPaolo Bonzini
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>
2025-05-05docs/users: drop + from GTKDylan Baker
This reflects the upstream project, which dropped the + in 2020
2025-05-05docs/users: Trim down only to highly notable projectsDylan Baker
This removes a lot of projects from our list of users, unless they are very notable.
2025-05-05docs/users: remove "not default" from XserverDylan Baker
2025-05-05docs/users: Split notable organizations from individual projectsDylan Baker
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.