summaryrefslogtreecommitdiff
path: root/test cases
AgeCommit message (Collapse)Author
2025-10-20interpreter: Fix extract_object subproject validationXavier Claessens
Fixes: #12519
2025-10-20Fix typos in authorship informationVlad-Stefan Harbuz
2025-10-17test cases: add test for cargo workspacesPaolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>, adjusted to make it compile with cargo.
2025-10-16rust: work around unintuitive behavior of -l:-bundlePaolo Bonzini
When a Rust target depends on an intermediate Rust library (.rlib) which itself has a dependency on a native static library, Meson's generated rustc command line failed to collect and propagate the search paths for these indirect native dependencies, leading to a linker error: error: linking with `cc` failed: exit status: 1 = note: rust-lld: error: unable to find library -l:libf.a collect2: error: ld returned 1 exit status The root cause is that the intermediate .rlib's metadata correctly stores the requirement to link the native library (via the -l flag), but it does not store the library's search path (the -L flag); the responsibility for providing the search path is therefore deferred to the final link command. Ensures that search paths for all transitive dependencies are collected, allowing the final linker invocation to find and correctly link the required native libraries. Reported-by: Martin Kletzander <nert.pinx@gmail.com> Fixes: 018d22482 ("ninjabackend: unify conversion from path to -L/-l", 2025-10-08) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-15backend/ninja: Ensure that a rust file is found when using StructuredSourcesDylan Baker
When a structured source contains non rust files, the backend may select such a file to treat as the main file. That doesn't work obviously, so instead filter the main file such that it must be a rust file.
2025-10-15revert local_program()Eli Schwartz
This reverts https://github.com/mesonbuild/meson/pull/15107 Explicit objections regarding the design were raised and not answered, so it shouldn't have been merged. It needs to be discussed and revisited.
2025-10-15Add interpreter kwarg to local_program()Xavier Claessens
2025-10-15Add local_program() functionXavier Claessens
2025-10-14pkgconfig: Improve handling of empty string depsEyal Itkin
Fix the original bug fix for #13950 to only warn about empty required strings, instead of failing the entire build. This will simplify the workflow for users that build the string from a possibly empty list, and save them the need for the added if-check. Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
2025-10-11Avoid running overriden program to get its versionXavier Claessens
The parent `__init__` was setting cached_version back to None. This fixes a regression caused by https://github.com/mesonbuild/meson/pull/8885.
2025-10-08rust: add test case for issue #15020Marc-André Lureau
Do not link with link_whole/bundle, to show linking issue with Apple ld. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-08vala: Add method to get generated GIR from a build_targetDylan Baker
Fixes: #2296 Fixes: #4481 Fixes: #5968
2025-10-08format: fix indentation at beginning of argumentsCharles Brunet
Fixes #14998
2025-10-04utils: merge per-platform utils into `platform.py`Dylan Baker
This allows us to simplify running mypy, as we can just mypy the entire utils module regardless of the platform we're using. As an added bonus, this means we open one less module.
2025-10-03rust: fix detection of main filePaolo Bonzini
If any dependency has "sources" in it, the file from the dependency might end up in the rustc command line. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-01format: fix handling whitespaces after string nodeCharles Brunet
Fixes #15019
2025-10-01Allow CustomTarget source for i18n.xgettextCharles Brunet
Fixes #15054
2025-09-24format: Fix indentation with parenthesesCharles Brunet
- Split long expressions in () according to max line length - Partly revert d028502 . Fixes #14935. - Fixes #15032.
2025-09-22rust: let doctests pick objects from dependenciesPaolo Bonzini
If a depedency includes object files, they have to be added to the doctest. However, NinjaBackend was not running flatten_object_list on the doctest. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-09-15Revert "test cases: do not pass global option on command line"Paolo Bonzini
This reverts commit 9b1eb8b8ed434d1c2fdca0d8ac46b79c9b91bb0f. It is not needed anymore since the pre-1.8 semantics were the good ones. Only leave in place the new and clearer testcase names.
2025-09-15Revert "tests: skip test common/223 in the -Ddefault_library=... jobs"Paolo Bonzini
This reverts commit 5ab871be5287aa5cce1e8dfdfb7c4a6b07b4f2f7. It is not needed anymore since the pre-1.8 semantics were the good ones.
2025-09-09msetup: not-found subprojects do not have known optionsPaolo Bonzini
If a subproject had its SubprojectHolder created, but was disabled, its options were not parsed; therefore the subproject should not be checked for unknown options. Fixes: #14969 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-29tests: add dict.values() testsMarvin Scholz
2025-08-29tests: add tests for the dict.keys() methodMarvin Scholz
2025-08-28python: add a python.build_config option (PEP 739)Filipe Laíns
Signed-off-by: Filipe Laíns <lains@riseup.net> Signed-off-by: Michał Górny <mgorny@quansight.com>
2025-08-26test cases/common/32 has header: disable undef with libcxxHaelwenn (lanodan) Monnier
Can be tested with adding -stdlib=libc++ to C++ flags. In file included from /usr/include/c++/v1/stdio.h:93: In file included from /usr/include/c++/v1/__config:14: In file included from /usr/include/c++/v1/__configuration/abi.h:15: /usr/include/c++/v1/__configuration/platform.h:35:7: error: function-like macro '__has_include' is not defined 35 | # if __has_include(<features.h>) | ^ /usr/include/c++/v1/__configuration/platform.h:48:5: error: function-like macro '__has_include' is not defined 48 | #if __has_include(<picolibc.h>) | ^ 1 warning and 2 errors generated. '
2025-08-26Set version, soversion from cmake if availableJulianne Swinoga
2025-08-26mformat: force multiline arguments with commaCharles Brunet
Force multiline arguments when there is a trailing comma. This is the behavior of muon. Fixes #14721.
2025-08-25fix transient failure on rust/12 bindgenPaolo Bonzini
The test has a custom .h target that has the same name as the input in the test's source directory. Sometimes a compiler could build a target that intends to use the file in the source tree, but finds an incomplete output of the custom_target, causing the test to fail. To fix this, move the generated headers in a subdirectory of the build tree. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-25coredata: check for per-subproject compiler and linker argumentsPaolo Bonzini
The compiler and linker argument options are special and are only added when the compiler is first discovered. Thus any project-specific values in a child project will remain sitting in pending_options after initialize_from_subproject_call; coredata needs to inform the option store that they now exist. Fixes: #14939 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-25coredata: check for per-subproject compiler optionsPaolo Bonzini
If the parent project has not enabled a language, the child project's project-specific compiler option values are sitting in pending_options after initialize_from_subproject_call, and the option store has to be informed that they now exist. Fixes: #14939 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-19Condense test dirs for rc3.Jussi Pakkanen
2025-08-17ninjabackend: pass objects to doctestsPaolo Bonzini
Fix my misunderstanding of the code before commit aede231ef ("ninjabackend: pass objects to generate_rust_target from non-Rust sources", 2025-07-29). Object files were added by get_rust_compiler_deps_and_args() to both the main target and the doctest command lines: objs, od = self.flatten_object_list(target) for o in objs: args.append(f'-Clink-arg={o}') deps.append(o) therefore they now need to be passed as the final argument of get_rust_compiler_deps_and_args() for both command lines as well. Failure to do so causes problems building doctests when the main target has objects as well. Add a regression test as well. Fixes: #14897 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-17rewriter: accept UnknownValue for name_prefix/name_suffixPaolo Bonzini
Fixes another problem with running "meson configure" on Mesa. Related: #14840 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-11Revert "build: Throw an error instead of warning for sourceless targets"Eli Schwartz
This reverts commit 651aede977179c5fe382744e3dd91ca8e01d050c. This was most certainly not acceptable.
2025-08-11Condense test directory names.Jussi Pakkanen
2025-08-10build: Throw an error instead of warning for sourceless targetsFlorian "sp1rit"​
We might run into an assertion failure down the road, if we don't fail here. Specifically project('proj') executable('bin', 'header.h') will throw during the ninja generation.
2025-08-10build: Ensure that linker requested in link_language is availableFlorian "sp1rit"​
Meson was running into an key lookup failure when evaluating the following: project('proj', 'c') executable('bin', link_language: 'cpp') and since 41eb18d also if the executable contained exclusively header sources.
2025-08-10rewriter: Accept UnknownValue() in more placesVolker Weißmann
Fixes #14840
2025-08-10tests: host_machine instead of meson.host_machine()Volker Weißmann
2025-08-04build: fix introspection interpreter issue when project selects RustPaolo Bonzini
The introspection interpreter sometimes produces targets with no source files; BuildTarget will then pick a random compiler, according to the order in clink_langs. According to the comment in sort_clink, clink_langs are supposed to list languages from *lowest* to highest priority. However, process_compilers_late() process clink_langs in straight order and returns the first language; which is the one with lowest priority. This became visible with the addition of Rust to clink_langs, because Rust has limitation on the names of library targets, but the bug existed before. Fixes: e49f2f7283e1d9f18e2f5f54647c07287cd70339 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-02Add swift_interoperability_mode kwargKatalin Rebhan
2025-08-01cargo: Use -rs suffix only for rust ABIXavier Claessens
A cargo package can build multiple crate types for the same library. Using the same name in meson.override_dependency() fails. [pbonzini: adjust documentation]
2025-08-01wrap: wraps from subprojects can replace directories found with no wrapXavier Claessens
If main project finds a directory subprojects/foo with no corresponding foo.wrap, it creates a dummy PackageDefinition for it. If we later find a subproject that has foo.wrap, replace the dummy wrap with it. This happens for example when wrap-redirect have been deleted. It also happens for subprojects downloaded from some Cargo.lock which does not create a wrap-redirect. Avoid loading the same location twice, which can happen when preparing cargo subprojects.
2025-08-01Condense test directory names for 1.9.Jussi Pakkanen
2025-08-01modules/pkgconfig: Resolve dependencies in case of an internal dependencyCorentin Noël
When giving a dependency object as requires, allow to use the dependency from a subproject (that is an InternalDepdency).
2025-07-29build: allow non-Rust files in non-structured sourcesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29test cases: add test for mixed Rust/C++ executablePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29build: reject invalid link_language for Rust targetsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29test cases: avoid missing_abi warning with recent RustPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>