| Age | Commit message (Collapse) | Author |
|
Skip the limited API test when the CPython version used indicates
being built with GIL disabled, i.e. the freethreaded build.
The freethreaded versions of Python 3.13 and 3.14 do not support
the limited API, and attempting to build the test case results
in compilation failures.
The check is limited to <3.15, so we don't forget to reenable it
once limited API is supported.
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
|
|
|
Fixes: #15222
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The Rust compiler will need these to check the rust_nightly option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The rustc invocation performs both compilation and linking, so it should include
link-phase arguments for LTO or sanitizers. RustCompiler has been taught how
to include these arguments, so now add them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This is often needed for mixed Rust/C programs, and in particular always
needed with sanitizers. Add it always.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Follow the suggestion in https://github.com/rust-lang/rust/issues/39016#issuecomment-2391095973
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Produce -Cembed-bitcode for Rust, and also disable bitcode
generation when LTO is not enabled.
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
No other linker warns for duplicate libraries, and (especially with
rustc) specifying --fatal-warnings may cause the warnings to trigger
and a wrong result from has_multi_link_arguments.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
These produce a linked build product like binaries and Rust-ABI dylibs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Of course, this checking isn't actually doing what it claims, as it
doesn't actually stop you from writing at target like:
```meson
build_target(
'foo',
'srcs/main.c',
c_pch : 'src/pch.h',
)
```
|
|
This really isn't a list because it's not homogenous data, it's really
`tuple[str, str | None] | None`, but we're using list length to decide
what to do with it, and that makes for strict null issues, as an
accurate annotation would be `list[str | None]`, which would require a
lot of `is not None` checking. By using a tuple we don't need to keep
checking length, which is more expensive than null checking.
To ensure correctness I annotated some things in the VS backend
|
|
|
|
What's left requires the Environment, so it will have to be handled in
the interpreter implementation for now.
|
|
|
|
This moves the listification and string checking to the interpreter, as
well as some basic size validation.
|
|
Clang supports prelinking using the same `-r` flag as GCC. There has been prior
art in [1], which stalled at the time due to Clang inappropriately trying (and
failing) to link libgcc_s. This issue does not occur any more with versions 14
and higher.
[1] https://github.com/mesonbuild/meson/pull/8883
|
|
bfd supports the 'gold' plugin API too, just the LLVM plugin is called
'LLVMgold'.
Closes: https://github.com/mesonbuild/meson/issues/10798
|
|
If the dependency version contains a space:
dependency('glib-2.0', version: '>= 2.40.0')
Then the --target-glib version has a space:
--target-glib ' 2.40.0'
The quotes and space have no effect on valac. Tidy the output.
|
|
clang++ seems to require the resolver function to have external linkage,
so the test code that was used was failing even though clang does
support the attribute.
Closes #12413.
|
|
The IntelCPPCompiler was incorrectly adding -fno-rtti when RTTI was
enabled (rtti=True) instead of when it was disabled. This change
corrects the logic to match the behavior of GCC and Clang compilers,
which properly add -fno-rtti when rtti=False.
Fixes #15220
|
|
GCC 15 supports incremental LTO (caching). It's the same feature as
Clang's ThinLTO caching.
Unfortunately, for the Clang ThinLTO cache support, we chose a pretty
vendor-specific option name, and I don't want to worry about deprecating
that (-Db_thinlto_cache and -Db_thinlto_cache_dir) at this time, so...
Wire -Db_thinlto_cache and -Db_thinlto_cache_dir for GCC in the obvious
and natural way.
Other notes:
* GCC, unlike Clang, requires the cache dir to exist. If the
user passes an invalid directory, that's on them, but for our default
in meson-private, we should os.mkdir() it, so we do that now too.
* I did wonder about adding -flto-partition=cache, but when I asked about
this last year [0], the response was that it has too many caveats. Though
Honza did recently [1] suggest it has some utility, so I don't know. I'll
ask about it.
[0] https://inbox.sourceware.org/gcc-patches/vjeanwm7b2jnedzmbwww4cy6jf4prty6ypxvz7x5d463xw2mys@bxzxuvgfaplf/
[1] https://inbox.sourceware.org/gcc-patches/aLnAGpln6SXbjV7e@kam.mff.cuni.cz/
Closes: https://github.com/mesonbuild/meson/issues/14428
|
|
Stop early-returning as we're going to do more work in this function
shortly for incremental LTO.
Bug: https://github.com/mesonbuild/meson/issues/14428
|
|
... by calling self.get_lto_compile_args, as we expect the same arguments
to be passed at both compile-time and link-time, and we're doing the exact
same procedure to determine -flto=XXX.
Bug: https://github.com/mesonbuild/meson/issues/9536
|
|
Without this, we pass (say) `-flto=auto` at compile-time, but just `-flto`
at link-time.
See also https://gcc.gnu.org/PR114655 and the linked r12-824-g3cbcb5d0cfcd17,
i.e. before GCC 12, we'd end up linking with 1 job.
The clang mixin looks correct already.
Closes: https://github.com/mesonbuild/meson/issues/9536
|
|
Instead of having a raw python exception, provide a helpful error
message that `[sub:sub1:project options]` should just be `[sub1:project
options]`
No test is provided as this is basic error handling, and I felt it was
not worth adding to our test runtime to test that we don't raise a raw
exception.
Fixes: #14222
|
|
This gets us to the point that the build layer can assume it's getting
valid inputs. This does two checks, an initial cheap check for generated
sources, and then an I/O check via `source_strings_to_files`.
|
|
These are two ways to implement the same thing, and at the DSL level the
`rust_abi` provides needed flexability, but at the lower level where a
target is a thing, the `rust_crate_type` is still proving to be more
useful. So, keep the `rust_abi` in the Interpreter and don't let it leak
into the build layer.
|
|
Because it's not clear how ownership is supposed to work here, and in
the case of `both_libraries()`, if there are any mutations made to them
then those propagate, which isn't what we want.
I'd like to do some further refactoring here that would make this not
necessary.
|
|
|
|
|
|
|
|
Why do work and then error out?
|
|
This just tests that it works, so it catches the previous bug. Not sure
how to test this more thoroughly.
|
|
When the mechanism to set the name of methods was changed this bug was
introduced.
|
|
In case of python and especially in the case of pyInstaller
where the python command is meson.exe runpython, it should
not be full path to be used but cmd_array.
Fixing #13834
|
|
Place the build products in a directory of the specified name
somewhere within the build directory. This allows use of the target
that includes a specific directory name:
#include <subdir/configure.h>
This also allows creating targets with the same basename by using
different subdirectory names.
v2:
Move build_subdir to Target class.
Error if path separator in build_dir
v3:
Rename to 'build_subdir' to make it clear that the name is
appended to a meson-specific build directory, and does not
provide the user with a way to define the overall meson build
hierarchy.
Allow build_subdir to include path separators.
Support 'build_subdir' for configure_file.
build_subdir must not exist in the source directory and
must not contain '..'
Add documentation and tests
v4:
Rebase and prepare for version 1.9.1
Add failing test case when build_subdir is present in the
project.
Add release note snippet
v5:
Clarify wording on restrictions on the value of build_subdir. Use
the same wording in each place this restriction is described.
v6:
Move path validation to shared function, validate_build_subdir,
instead of duplicating the tests in two places.
v7:
Update version numbers to 1.10.0
Add TypedDict updates.
Remove spurious build_subdir instance variable
v8:
Oops, missed one version number update.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Add meson-setup.txt to keep the configure log
out of the debug logs.
|
|
If a CustomTargetIndex is passed as an argument to a test, running meson
test (with no test glob) does not automatically build the custom_target
before running the test, because CustomTargetIndex outputs are not added
as prerequisites to the meson-test-prereq and meson-benchmark-prereq
targets.
Fixes: #14743
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
The entire policy system has been deprecated in Python 3.14, and is
slated for removal in 3.16. This has been caught by pylint, and is
causing CI to fail.
For our use case this is only relevant on Python 3.7 on Windows, as the
default policy on 3.8 is set to the Proactor anyway.
|
|
|
|
This is a clear copy-n-paste or rebase error on my part.
|
|
It is not overridable via --py-version, astoundingly.
|
|
https://truststore.readthedocs.io/
This library allows patching the stdlib ssl module to respect system
certificates, which is a common source of "broken internet" for Windows
users especially.
Fixes: https://github.com/mesonbuild/meson/issues/15121
|
|
libc++ uses the same macro name, just with different values, for debugstl.
If the distro or similar predefines a hardening mode lower than the mode
debugstl wants (or in any other way not equal), we get an annoying redefinition
warning.
Closes: https://github.com/mesonbuild/meson/issues/13812
|
|
Bug: https://github.com/mesonbuild/meson/issues/13978
|
|
This has two problems:
1) it keeps breaking with Apple Clang (bug #14440, bug #14856)
2) it gets confused when using GCC with libc++ (a rare configuration)
because compiler version != libc++ version
There's no reason to keep catering for old libc++ here. The feature
was somewhat immature in older libc++ anyway.
Just rip it out and then we can go back and restore it for the niche
case later.
Bug: https://github.com/mesonbuild/meson/issues/14440
Bug: https://github.com/mesonbuild/meson/issues/14856
Closes: https://github.com/mesonbuild/meson/issues/13978
|