| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
For the same reason that the StaticLinker needs this, we need it in the
DynamicLinker as well.
|
|
There are a number of places where we treat StaticLinker and Compiler as
polymorphic, as such the StaticLinker cannot need extra parameters.
|
|
This is calculated by `Environment().is_cross_build(for_machine)`. Since
we have that in the Compiler class, just calculate it in the Compiler
initializer
|
|
We end up needing it everywhere, so just store it. This patch is huge
already, so it's just the conversion to passing Environment, more
cleanups to come.
|
|
Instead of relying on __meson_verbose being defined or not, handle
its value; in context of larger build systems (like open build service)
this allows a project wide configuration to override %__meson_verbose to 0
|
|
|
|
Using os.path.basename on a string such as "/foo/bar/" returns an
empty string, which breaks on e.g. Cgit git URLs.
The fix uses pathlibs Path class "parent" method, which gets the last
component of the path, so "bar" for "/foo/bar/".
|
|
The previous commit eb1e52afa142fc0f38260a9cb3413f2bd63b1675 introduced
a variable `rebuild_only_tests` to fix various edge cases in
rebuild_deps.
In particular, if all tests are selected anyway, rebuild_deps prior
to the introduction of `rebuild_only_tests` would potentially
create a huge list of targets, which may overflow the
ARG_MAX limit.
For that case `rebuild_only_tests` was introduced and is set to an empty list, which means that rebuild_deps falls back to the `meson-test-prereq` ninja target, that already contains the necessary targets.
This is wrong, though, when `meson test` is executed with the "--suite"
option. In that case, the user requested a particular subset of the
tests, but `rebuild_only_tests` will be set to an empty list anyway,
which means the `meson-test-prereq` target is executed, which contains
the targets for all tests.
Instead, `rebuild_only_tests` should only be set to an empty list,
when the selected tests are identical to the complete list of available
tests: `tests == self.tests`
Since after this commit we compare directly to the result of `self.get_tests()`, this
will do the correct thing for all other options, which change or filter
the list of selected tests (e.g. `self.options.args`, `self.options.slice`).
|
|
If the first line already conained a match, the former regex didn't
catch it correctly, because it was looking for a newline character to
detect the start of a line.
The new regex is using the proper `^` to match the beginning of a line.
For this to work as expected the `re.MULTILINE` flag has to be set.
|
|
Sometimes, a Rust static library's native static libs refer to
libraries installed in the rustc target libdir. This is always the
case for most musl targets (with the intention of making it easier to
use them on non-musl systems), and other targets can also be
configured to do this using e.g. the llvm-libunwind option when
building the standard libraries for the target. When rustc is
responsible for linking it will always add the appropriate directory
to the linker search path, but if we're not using Rust for linking, we
have to tell the linker about that directory ourselves.
The added test demonstrates a scenario where this comes up: linking a
static Rust library, built for musl, into a C executable. -lunwind is
in the native static libs list from the compiler, but it's referring
to the libunwind.a in the self-contained directory.
|
|
Fixes: #15258
|
|
This does not work correctly with clang-cl/lld-link
|
|
Adding support for linker option broke -Db_coverage because the
`--coverage` option is added to the command line without the
`-Clink-arg=` part. Fix it by overriding get_coverage_link_args;
since we have to add the get_coverage_* functions to RustCompiler,
teach it to generate `-Cinstrument-coverage` as well.
Note that `-Clink-arg==--coverage` is actually useful only for
mixed C/Rust programs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Currently meson generates a huge page for functions. For now we'll
keep compatibility with it, but it's a lot cleaner to have separate
pages as well as it makes it easier for search engines to parse as
well as sending direct links
Signed-off-by: Swagtoy <me@ow.swag.toys>
|
|
Fixes #15011
|
|
|
|
We can't modify dict-valued kwargs (#14739) but this lets us at least read
them.
|
|
The `default-options delete` and `kwargs delete` subcommands required
key/value pairs, where the key was deleted and the specified value was
ignored. This matches the JSON script mode interface but is unpleasant
as a CLI. Have the CLI `delete` commands accept a list of keys instead.
We can make this change because the UI is documented to be unstable.
However, to allow scripts to work with both old and new Meson, ignore
even-numbered arguments if they're all equal to the empty string.
Fixes: #13234
|
|
Many rewriter subcommands expect key/value pairs as adjacent arguments.
If the last value is missing, show a user-friendly error instead of a
backtrace.
For: #13234
|
|
|
|
Fixes: e81acbd606 ("Use a single coredata dictionary for options")
|
|
The project ID must be "/" and cannot be an arbitrary string.
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This is a new attribute released in GCC 15 and clang 18. It isn't
supported in C++ compilers at the moment.
|
|
Previously, we exited as "number of test failures", as a side effect of
a refactor. Regressed in commit 297749581dd4dcb4e68da4b1d0622d2916fb8db3.
This was a bad sentinel for "track if tests have failed", and formerly
we did indeed set "returncode = 1" upon encountering a test fail! The
consequence of this is that we break:
- returning failure at all, if test fails are a multiple of 256
- returning 125 for "git bisect run shall skip this commit", as a
documented guarantee of meson
- returning > 127 shall abort bisection entirely
The behavior is nonsensical and accidental, and nobody should be using
this accident to count the number of failed tests (as it won't even work).
Fixes: https://github.com/mesonbuild/meson/issues/15251
|
|
This info is also available from the "result" entry, but requires
mapping result types to "would cause a failure, but isn't literally
FAIL". It comes in handy for the meson testsuite, too.
|
|
|
|
Since commit 44ce04537 ("cargo: Add library API version into its name", 2025-10-28),
the target names provided by cargo subprojects have a suffix corresponding to the
library API; for example, the target that used to be "gtk4" is now "gtk4+0_10".
This however is an implementation detail, and the change broke rust_dependency_maps
that expected to use the crate name.
While the target name is preferrable, and will work great when Meson is able
to create dependency maps by itself (as is the case for the Cargo interpreter),
preserve the old behavior by checking also the entry corresponding to the result
of _get_rust_crate_name.
Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Give a practical example of how it is used.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
This extends the code that strips executable keyword arguments to also
default populate shared_library exclusive arguments.
Fixes: #15238
|
|
Which removes the need to assert it.
|
|
|
|
1. Generate OMF objs with `-Zomf' compiler flags
2. Generate OMF libs with `.lib' suffix using `emxomfar' as a librarian
|
|
|
|
Give an user opportunities to mangle a custom short name for a DLL on
OS/2.
|
|
On OS/2,
1. a shared libary has '.dll' suffix
2. a length of DLL name should not be longer than 8 chars
3. an import library is used to link against a DLL
4. an import library has '_dll.a' suffix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Extracted from https://github.com/mesonbuild/meson/pull/15230
Co-authored-by: Charlie Hutcheson <chaz.hutcheson@gmail.com>
|
|
Regression in commit 6ee583e119b432fee03f908547729d5da030397e.
str.version_compare() accepts varargs unless the str was defined via
meson.version(), which isn't supposed to be a visible end user
distinction.
That being said, it makes no sense to support the special casing here.
- FeatureNew only compares conditions with min, not with max
- Having multiple min conditions is illogical and there's no need to
support it.
So we allow varargs for parity, but debug log that we can't handle it
specially and refrain from setting tmp_meson_version at all.
Fixes: https://github.com/mesonbuild/meson/issues/15217
|
|
meson_version: '>=1.8.0' works to control FeatureNew -- but < does not.
Likewise with version_compare.
This may or may not surprise people. Leave a hint in the logfile.
|