Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Which better describes their purpose, especially now that this is in the
options module rather than the compilers module.
|
|
It's not just project options, it's all options that can end up on here.
|
|
Since they're not just native files, they're native files and cross
files combined.
|
|
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.
|
|
|
|
Mostly this was just adding a few asserts for options, and one bug fix
from the option refactor
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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
|
|
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.
|
|
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>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Pass down the full_version, otherwise assigning "self.is_beta"
fails.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Allow reusing the code for doctests. In particular, the sources are
shared between the two cases.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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>
|
|
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
|
|
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
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
Cuts down the spam radically when building with MSVC.
|
|
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
|
|
Move the mention of the (deprecated) default command mode
down near the end of the page, instead of presenting it right
up front.
|
|
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
|
|
MSYS2 dropped Python 2 in https://github.com/msys2/MINGW-packages/pull/23713
|
|
|
|
|
|
|
|
|
|
subproject_dir, environment, and coredata
|
|
|
|
It is not used elsewhere
|
|
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
|
|
The behavioral change is there since be1d013453e3df3b83da0c91f5211c822d4da4d7 so
align the documentation with what is allowed here.
|
|
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>
|
|
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
|
|
|
|
Which are basically the same, except for handling of deprecated options,
and various bugs that only existed in one implementation or the other.
|
|
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.
|
|
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.
|