Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
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>
|
|
|
|
|
|
As documented in https://docs.python.org/3/library/os.html#os.walk:
> dirnames is a list of the names of the subdirectories in dirpath
> (including symlinks to directories, and excluding '.' and '..')
So currently, we treat any symlink to a directory as a directory instead
of as a symlink. In practice, this means symlinks to directories are
installed as empty directories instead of as symlinks.
Let's make sure the symlinks are kept intact by checking for symlinks
when we iterate over the directory names and treating any symlinks we
find as files instead of as symlinks.
|
|
In AIX, when we use ar -q to archive then if there is a shared object already existing with the same name a duplicate one is created if one tries to archive again.
Meson archives shared library during build time and relinks again during install time. At this stage when shared object is again made and archived again, creating two shared objects in the archive.
When we use "ar -rs" then we ensure it is only one.
Reference: https://www.ibm.com/docs/en/aix/7.1?topic=ar-command
This patch is a fix to the same.
Before patch output:
rwxr-xr-x 0/0 5018 Apr 14 05:57 2025 libmylib.so
rwxr-xr-x 0/0 5018 Apr 14 05:58 2025 libmylib.so
After patch output:
rwxr-xr-x 0/0 5018 Apr 14 07:23 2025 libmylib.so
|
|
This makes it possible to run tests ("1 trivial" passes).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Use the custom suffix instead of .dylib, so that executables that are linked to
a custom-suffix library can be ran from the build tree.
Fixes: #14470
|
|
|
|
If the user specifies java sources as input to a non-jar build
target, raise an error with a message directing them to use the jar
target instead.
Fixes: https://github.com/mesonbuild/meson/issues/13870
|
|
This method call xgettext to extract translatable
string from source files into a .pot translation template.
It differs from a plain CustomTarget in three ways:
- It accepts build targets as sources, and automatically resolves source
files from those build targets;
- It detects command lines that are too long, and writes, at config
time, the list of source files into a text file to be consumed by the
xgettext command;
- It detects dependencies between pot extraction targets, based on the
dependencies between source targets.
|
|
Because we will need to call it from a module in a followup commit.
|
|
|
|
Cover ":foo" syntax in default_options as well.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|