| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Allow specifying e.g. -Dbackend_max_links on the command line.
Fixes: #14524
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Which command line options are valid is not entirely known until the backend
option is processed. Split the validation to a separate function so that it
can be done later, and while at it mention all unknown options instead of
just the first.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Based on the SharedCMDOptions protocol it is guaranteed to be a dictionary.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Avoid reinventing the wheel and instead use a single helper, taking care
of logging and cross compilation.
Fixes: #14373
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Particularly if using an exe_wrapper, it can be useful to have output
logged for debugging.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The unit tests for the `meson test --slice=` option check that the
option is working by extracting all tests that have been run from the
command output. This is done with a rather loose regular expression
"test-[0-9]*", which can easily match other parts of the output, as
well.
One user for example reported that the test broke because they were
executing tests in a directory called "meson-test-1.8.0-build", and
given that the "test-1" part of that directory matches the regular
expression we have too many matches.
Fix the issue by tightening the regex so that is way less likely to
match anything from the host's build environment.
Reported-by: Dominique Leuenberger <dleuenberger@suse.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Path.is_dir() can raise a PermissionError if a parent does not have
the executable permission set; plus the "in p.parents" tests are
very expensive. Do not use Path at all.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
The data is already available in the OptionStore's pending_options and
add_compiler_option() will pick it from there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Because system options apply to all subprojects, they need to be
present globally whenever a subproject needs them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Prepare for adding more complex logic to add_system_option_internal, in
order to handle inheritance of global options to subprojects.
Do the same in add_project_option to make the similarities and differences
evident.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
If we return the default value of the `b_sanitize` option, it won't go
through the conversion back to string. This shows up in the ClangCL
implementation.
Fixes: #14501
|
|
This code cannot be reached, as the guard checking that `value_object`
is a UserOption will always be true.
|
|
These changes were correct in the original PR, but the changes to the
keyword arguments were dropped in the rebase that landed, so this is now
incorrect.
|
|
Fixes #12330
|
|
We don't want churn with thie list for every project someone creates
that uses Meson. Change the intro to say we want notable projects and
link to a GitHub search for 'meson.build' files for people who want
further examples to consider.
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes: #810
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If CMake fails to find a package, we should log it in meson-log.txt, but
shouldn't bother the user unless there are details to report. In
addition, we were calling mlog.warning() without fatal=False, so if msetup
was called with --fatal-meson-warnings we'd fail the entire setup in this
case, even for optional dependencies. Log a notice with fatal=False if
CMake reported an error, and a debug message otherwise.
Notably, the "even though Meson's preliminary check succeeded" case can
occur when a dependency is missing but its Find*.cmake is shipped with
CMake itself.
Fixes: 92c517ea69 ("output PACKAGE_NOT_FOUND_MESSAGE as warning when CMake package is not found")
|
|
See also https://github.com/hauntsaninja/mypy_primer/pull/77
|
|
validate_original_args only checks whether an option is prefixed with the name of a
built-in option that was also set. It does not check whether the prefix is the full
name of the option specified with -D. Adding an "=" at the end fixes the test.
Fixes: #14487
Reported-by: Alyssa Ross <hi@alyssa.is>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
By setting android_exe_type to `application`, the executable gets
actually built as a shared library instead of an executable. This makes
it possible to use an application within an android application process.
mesonbuild#13758
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7555/
|
|
executable did not respect the name_prefix kwarg
|
|
|
|
```
$ LDFLAGS="-fuse-ld=lld" meson setup builddir/
[...]
linker = lld_cls(
compiler, for_machine, comp_class.LINKER_PREFIX, override, system=system, version=v)
TypeError: LLVMDynamicLinker.__init__() got an unexpected keyword argument 'system'
```
Fixes regression in commit cece1a7e9992a3bbcc35f90777ba22ba9d62b538. We
pass system=system to the linker construction, which worked fine for
Apple LLVM LD64 as that inherited `__init__` from DynamicLinker. But
non-Apple LLD had an overridden `__init__` which wasn't adapted.
Even if it is thrown away and never used, since LLVM isn't an Apple
linker, we still need to obey the argument contract.
|
|
|
|
Closes https://github.com/mesonbuild/meson/issues/14419
|
|
|
|
Depending on the target/linker, rustc --print native-static-libs may
output MSVC-style names. Converting these to Unix-style is safe, as the
list contains only native static libraries.
Fixes linking with C targets built with clang on x86_64-pc-windows-msvc
target.
Fixes: #14366
|
|
This will be handled by target binary link. And if it's not compatible
with what Rust uses, it wouldn't work anyway.
|
|
iOS should not use -undefined,dynamic_lookup; whereas macOS should revert from
-dynamiclib to -bundle, as was the case before commit cfb5a48e0 ("linkers: darwin:
do not use -bundle for shared_modules", 2025-03-24), because Postgres wants to
use -bundle_loader and that is only possible together with -bundle.
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Apple linkers need to use different arguments on macOS and iOS-like platforms.
Pass the system to the constructor so that it can be examined.
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
All of iOS, tvOS, visionOS, watchOS use the XNU kernel. Report that and also
make them return true for is_darwin() which is really more like "is_xnu()".
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|