aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-04-02option: move the `is_per_machine_option` to the `OptionStore`Dylan Baker4-9/+7
2025-04-02options: Rename BASE_OPTIONS -> COMPILER_BASE_OPTIONSDylan Baker3-6/+6
Which better describes their purpose, especially now that this is in the options module rather than the compilers module.
2025-04-02options: rename OptStore.pending_project_options -> pending_optionsDylan Baker2-12/+16
It's not just project options, it's all options that can end up on here.
2025-04-02options: rename "native_file_*" arguments to "machine_file_*"Dylan Baker1-8/+8
Since they're not just native files, they're native files and cross files combined.
2025-04-02options: move BASE_OPTIONS to the options moduleDylan Baker5-48/+39
This makes more sense from a "group all options together" It also allows us to remove a bunch of imports in functions, a clear code smell.
2025-04-02unittests: use more subtestsDylan Baker1-9/+11
2025-04-02modules/cmake: Make fully type safeDylan Baker2-7/+17
Mostly this was just adding a few asserts for options, and one bug fix from the option refactor
2025-04-02add testcase for subproject options in machine filePaolo Bonzini4-0/+8
2025-04-02use correct section when suggesting the placement of subproject optionsPaolo Bonzini1-6/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02environment: remove incorrect check for subproject optionsPaolo Bonzini1-2/+0
Because this check is done on the actual key, it will fail even if "subproject:project options" is used. The correct test is already performed in mfilestr2key. Fixes: #14373
2025-04-02wayland: Mark module stableXavier Claessens2-8/+5
There is no point in printing warning about unstable module, in the worst case we can just deprecate and add new API. It has been tested in a few projects already, and this warning is a blocker on wider adoption.
2025-04-02rust: add link_whole to rust.test and rust.doctestPaolo Bonzini3-2/+14
QEMU needs it in its integration tests (in order to run global constructors), and therefore in rust.doctest too. With this change I could do: # Rust executables do not support objects, so add an intermediate step. rust_qemu_api_objs = static_library( 'rust_qemu_api_objs', objects: [libqom.extract_all_objects(recursive: false), libhwcore.extract_all_objects(recursive: false)]) rust.doctest('rust-qemu-api-doc', _qemu_api_rs, dependencies: [qemu_api, qemu_api_macros], link_with: libqemuutil, link_whole: [rust_qemu_api_objs], suite: ['doc', 'rust']) followed by "meson test --suite doc". For completeness, add it to rust.test as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02rust: add rust.doctestPaolo Bonzini4-13/+108
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02rust: extract common parts of rust.test and rust.doctestPaolo Bonzini1-21/+33
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02rust: unit tests: do not use deprecated rust_crate_typePaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02compilers: rust: fix derivation of RustdocTestCompilerPaolo Bonzini1-1/+2
Pass down the full_version, otherwise assigning "self.is_beta" fails. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02interpreter, rust: move "args" out of BaseTestPaolo Bonzini3-4/+11
rust.doctest() will have to typecheck that to a list of strings, no other argument types are allowed. Extract the field out of BaseTest, placing it in FuncBenchmark and the rust modules's FuncTest. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02ninjabackend: generate command line for rust doctestsPaolo Bonzini2-5/+24
Adjust get_rust_compiler_args() to accept the crate-type externally, because rustdoc tests are an executable but are compiled with the parent target's --crate-type. Apart from that, the rustdoc arguments are very similar to the parent target, and are handled by the same functions that were split out of generate_rust_target. This concludes the backend implementation of doctests, only leaving the implementation of a doctest() function in the rust module. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02build, interpreter: associate a doctest target to a BuildTargetPaolo Bonzini4-17/+26
A doctest target is a separate build target (with its own linker arguments, including dependencies) that is built and added as a unit test whenever the parent target is built. The doctest's target is not accessible via ninja. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02compilers: introduce get_exe() and get_exe_args()Paolo Bonzini8-12/+23
This will be used by rustdoc tests because the Test objects takes a single string for the command and everything else goes in the args. But apart from this, the need to split the executable from the arguments is common so create new methods to do it. While at it, fix brokenness in the handling of the zig compiler, which is checking against "zig" but failing to detect e.g. "/usr/bin/zig". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02ninjabackend: split out generation of rustc argumentsPaolo Bonzini2-26/+49
Allow reusing the code for doctests. In particular, the sources are shared between the two cases. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02docs: add release notes for "ninja rustdoc"Paolo Bonzini1-0/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-02rust: new target rustdocPaolo Bonzini3-0/+135
Another rust tool, another rough copy of the code to run clippy. Apart from the slightly different command lines, the output is in a directory and test targets are skipped. Knowing the output directory can be useful, so print that on successful execution of rustdoc. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-03-26select the correct meson_command for pyinstaller builds, even on not-WindowsEli Schwartz1-1/+1
We have previously updated the python_command handling to correctly detect PyInstaller builds without assuming that it is only Windows, back in commit c39ee881a1959ae37aded8e0c24cec23b2bd6a90. But the fix was incomplete. This affects e.g. running --internal scripts such as symbolextractor. The issue in this case is slightly more subtle. While sys.executable won't be a valid python so it intuitively falls over quite badly when trying to run it as one, getting the original command is broken in a more interesting way. PyInstaller sets `sys.argv[0]` to the basename of the executable, which then got absolutized to a nonexistent file in the current working directory. Fixes: https://github.com/mesonbuild/meson/issues/14412
2025-03-26envconfig: fix unhandled exception when cross-file lacks required keysyexiaochuan1-1/+1
Fix the unhandled KeyError exception that occurs when cross-compilation configuration files are missing required parameters (such as 'endian'). This issue was introduced in commit b0d2a92 (PR #11692), where the key validation logic didn't properly handle the relationship between provided and required keys: - Previously, the code used `set(literal) < minimum_literal` to check if provided keys were a strict subset of the required keys in minimum_literal - This validation logic broke down when the provided keys weren't a strict subset anymore, but rather an overlapping set with disjoint elements on both sides - When required keys were missing, the code continued execution and later threw an unhandled KeyError when trying to access the non-existent keys Changed the condition check from: if set(literal) < minimum_literal: to: if minimum_literal - set(literal): This new check specifically identifies keys that are "present in required but not present in provided", providing users with clear error messages instead of raising unhandled exceptions. This change also removes the implicit requirement that "provided keys must not contain any keys not present in the required set" - allowing for optional keys to exist in the provided configuration. Fixes #14385
2025-03-26docs: Clarify string building with absolute pathsPaul Caprioli1-0/+2
2025-03-24linkers: darwin: do not use -bundle for shared_modulesPaolo Bonzini2-3/+2
Both dynamic libraries and bundles these days can be dynamically loaded using the dl APIs (e.g. dlopen, dlclose). It is not possible to include bundles on a linker command line as if they were shared libraries, but that's pretty much the only difference. However, bundles fail the Apple verification for iOS: 2025-02-10 13:54:09.095 ERROR: Validation failed (409) The binary is invalid. The executable 'Runner.app/Frameworks/numpy._core._operand_flag_tests.framework/numpy._core._operand_flag_tests' has type 'BUNDLE' that is not valid. Only 'EXECUTE' is permitted. 2025-02-10 13:54:09.096 ERROR: Validation failed (409) Missing load commands. The executable at 'Runner.app/Frameworks/numpy._core._operand_flag_tests.framework' does not have the necessary load commands. Try rebuilding the app with the latest Xcode version. If you are using third party development tools, contact the provider. So switch to -dynamiclib for shared modules as well. Fixes: #14240
2025-03-24docs: Fix apt-get installation command linehpkfft.com1-6/+11
2025-03-24Fix doc for `meson test --print-errorlogs` [skip ci]Khairul Azhar Kasmiran1-5/+5
2025-03-24dependencies/dev: prepend sysroot when searching for GTest sourcesRoss Burton1-1/+3
Don't hardcode paths in /usr when looking for the GTest sources, as in cross-compile or other builds with a sysroot this will find the host sources, not ones that we want to use in the sysroot. Closes #12690.
2025-03-21options: Make sure the gnu99 deprecation is only printed onceL. E. Segovia1-1/+1
Cuts down the spam radically when building with MSVC.
2025-03-21CI: Fix filemode tests with cygwin 3.6.0Jon Turney3-18/+4
Put cygwin filemode tests back under the sourcedir Remove inheritable permissions from the sourcedir For :reasons:, the unit tests which check file mode were built in the tempdir. Instead, remove inheritable permissions from the working directory (which the GitHub VM image has set for some reaons), since they can interfere with getting exactly the file mode you asked for. Partially reverts 04ae1cfb7999e25f476f84572ff0ad853629346c
2025-03-20man page: Running without 'setup' is deprecatedFeRD (Frank Dana)1-13/+7
Move the mention of the (deprecated) default command mode down near the end of the page, instead of presenting it right up front.
2025-03-20handle monorepo license files specified in project() via ../Eli Schwartz4-5/+14
We should simply remap these to elide the ../ as it's pretty obviously the natural expectation of using ../ to fetch files from outside the project and then drop them *into* the project. Monorepos will likely have a single license file (or set) under which the monorepo is licensed. But there will be many components, each of which may use a different build system, which are "standalone" for the most part. We already support this case as long as you build from the monorepo, but the resulting license file gets installed to ``` {licensedir}/../ ``` which is silly and unhelpful. Bug: https://github.com/apache/arrow/issues/36411
2025-03-20ci: stop installing python2 for the msys2 jobs, it's goneChristoph Reiter1-1/+0
MSYS2 dropped Python 2 in https://github.com/msys2/MINGW-packages/pull/23713
2025-03-20hdf5: don't throw if the pkg-config doesn't support --list-allMarcin Serwin1-4/+8
2025-03-14Move Interpreter.read_buildfile to base classCharles Brunet2-6/+3
2025-03-14Add subTests to test_introspect_json_dumpCharles Brunet1-93/+93
2025-03-14Move options loading to InterpreterBaseCharles Brunet3-39/+37
2025-03-14Move variables to InterpreterBaseCharles Brunet5-17/+12
subproject_dir, environment, and coredata
2025-03-14Extract common func_subdir functions to InterpreterBaseCharles Brunet3-52/+52
2025-03-14Move flatten_kwargs to IntrospectionInterpreterCharles Brunet2-11/+11
It is not used elsewhere
2025-03-12mesonbuild/compilers/detect.py: Support Open D ldc and dmdAndrei Horodniceanu1-1/+5
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2025-03-12modules/gnome: header argument of generate_gir accepts an array of stringsCorentin Noël1-1/+2
The behavioral change is there since be1d013453e3df3b83da0c91f5211c822d4da4d7 so align the documentation with what is allowed here.
2025-03-11tests: support DC being more than plain dmd or ldc2Andrei Horodniceanu1-4/+1
Dub is very thorough about what it encodes in a build id even collecting the compiler path. Therefore, if dub is not provided the exact same compiler path that meson got during setup, the dependency would not be found and the test would fail. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2025-03-11linkers: revert a binutils bug workaround, sort ofEli Schwartz1-3/+9
More specifically, the bug had been fixed shortly before we implemented this workaround. It's documented as only necessary for the binutils brand specifically, and was fixed upstream in 2.28. We can avoid producing these arguments at all on newer (post-2016) versions of binutils, so gate this behind a version check. This can significantly reduce the size of compiler command lines in some cases, as it encodes the full build directory. It also helps that one person who decides to put commas into their build directory name (which `-Wl,...` interprets as multiple arguments, rather than a single directory string). Bug: https://github.com/mesonbuild/meson/pull/1898 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20535 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16936
2025-03-10options: inline _set_dependenentsDylan Baker1-8/+5
2025-03-10options: merge set_value and set_optionDylan Baker3-57/+33
Which are basically the same, except for handling of deprecated options, and various bugs that only existed in one implementation or the other.
2025-03-10coredata: remove get_option_for_subprojectDylan Baker7-25/+19
This is just a wrapper around `OptionStore.get_option_for`, but without taking an `OptionKey`. This complicates the subproject passing, since `OptionKey` is designed to encapsulate the option name and subproject.
2025-03-10coredata: replace get_option with optstore.get_value_forDylan Baker37-100/+97
This is an old method, that is now just a wrapper around the OptionStore method, that doesn't add any value. It's also an option related method attached to the CoreData instead of the OptionStore, so useless and a layering violation.