New features (in development)
Support for workspace.exclude in Cargo manifests
Directories that are listed in the workspace.exclude field of Cargo.toml
are not treated as workspace members anymore. Such packages can still be
used through a path dependency, as long as they are placed directly in the
subprojects directory. This allows using nested workspaces if needed.
CMake command wrappers accept arguments with backslashes
CMake subprojects can now configure add_custom_command(),
add_custom_target(), and set_property() calls whose arguments contain
backslashes. Meson's preload wrappers previously expanded those arguments a
second time, which could reject valid values such as regular expression
backreferences during configuration.
Target introspection reports all direct target dependencies
The depends entry in intro-targets.json now reports direct target
dependencies from target inputs, generated sources, extracted objects,
internal linking, and explicit depends arguments. Previously it only
reported the dependencies attribute used by alias and run targets, so most
build target and custom target dependencies were omitted.
Allow using generator with any build_tgt object
Passing any build target to generator.process() is now allowed.
Jar files are now installed reproducibly
Installing a jar target used to invoke the jar tool to strip the
Class-Path attribute from its manifest, even when there was none.
This replaced the manifest's timestamp inside the jar with the time of
installation, so two builds of the same sources produced different
installed jars.
Manifests are now edited with Python's zipfile module instead. Jars
without a Class-Path attribute are installed unmodified, and when the
attribute has to be stripped, all entry metadata such as timestamps is
preserved. As a side effect, the jar binary is no longer needed at
install time.
meson.can_run_host_binaries() now accounts for Rosetta 2 on Apple Silicon
Previously, when cross-compiling for x86_64 on an aarch64 Mac,
meson.can_run_host_binaries() (and the underlying needs_exe_wrapper
logic) always returned false, even though Rosetta 2 lets these Macs
execute x86_64 binaries directly. Meson now detects whether Rosetta 2
is installed and, if so, reports that x86_64 host binaries can run
natively without requiring an exe_wrapper.
New Rust compiler options matching Cargo profile keys
Several new per-machine Rust compiler options have been added so that the
settings found in a Cargo [profile] section can be expressed natively:
-
rust_panic(none,unwind,abort): selects the panic strategy (-C panic=). It is ignored fordylibandproc-macrocrates, which must always unwind. -
rust_overflow_checks(true,false): toggles runtime integer overflow checks (-C overflow-checks=). -
rust_codegen_units(integer,0to use the compiler default): number of code generation units to split a crate into (-C codegen-units=). -
rust_incremental(true,false): enables incremental compilation (-C incremental=). -
rust_incremental_cache_dir(path): directory used to store the incremental compilation data. When left empty a per-target directory under the build directory is used.
The remaining Cargo profile keys map onto existing built-in options:
opt-level to optimization, debug to debug, debug-assertions
to b_ndebug and lto to b_lto.
The Cargo workspace object will also add these automatically based on
the value of another new option, rust_cargo_profile.
c_std=clatest support for MSVC
The option enables all currently implemented compiler and standard library features proposed in the next draft C standard, as well as some in-progress and experimental features.
Per-subproject language arguments are now applied
Compiler and linker arguments set for a specific subproject, for example
-Dsub:c_args=-DFOO on the command line or c_args in the
default_options of a subproject() call, are now added to the compile
and link commands of that subproject's targets. Previously such values
were accepted and stored but silently ignored.
Similarly, <lang>_args and <lang>_link_args entries in a target's
override_options now take effect.
In all cases the per-subproject or per-target value replaces the global
value (including flags coming from environment variables such as
CFLAGS), it is not appended to it. This matches what
get_option('c_args') already returned inside a subproject.
Use werror for gnome.generate_gir(fatal_warnings:)
If fatal_warnings is not passed to gnome.generate_gir(), the value of
the werror option is now read to determine whether to turn it on.
Explicitly passing fatal_warnings: true or fatal_warnings: false
still takes precedence over werror.
Wild linker is now supported on Linux
When CC_LD environment variables is set to wild, Meson will configure GCC 16+ or Clang
to use Wild as the linker on Linux. You should expect to see line like this in the output:
C linker for the host machine: cc ld.wild 0.10.0 confirming that Wild was picked up.
The results of the search are