| Age | Commit message (Collapse) | Author |
|
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
|
|
|
|
|
|
Many crates that have a build.rs will usually require an overlay
with the translated meson/meson.build file. To avoid having to
create a .wrap file, when parsing Cargo.lock autodetect a directory
in subproject/packagefiles/ and add it as the patch_directory.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
Currently, you can call `meson.get_compiler('c')`, if you haven't
initialized 'c' for your project, but a super-project has initialized
it. This happens because we check the wrong set of compilers (the global
list vs the per-subproject one).
Because of how fragile this is, we can mark it as broken an move on.
|
|
|
|
This reverts commit 632115ecff3bd7f9cb519098e04e0467b0cfd3a1.
|
|
The script internally has a timeout of 60s, so the default of 30 on
the meson side is too aggressive. Crank it up to 65.
|
|
|
|
This can come in handy for instance when a custom target creates both
headers and sources. Slicing the output of a `to_list()` call provides
convenient access to just the headers or just the sources.
|
|
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
|
|
|
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>
|
|
|
|
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
|
|
This is a new attribute released in GCC 15 and clang 18. It isn't
supported in C++ compilers at the moment.
|
|
|
|
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>
|
|
|
|
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.
|
|
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>
|
|
Produce -Cembed-bitcode for Rust, and also disable bitcode
generation when LTO is not enabled.
|
|
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
|
|
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.
|
|
The Microchip XC32 compiler is a GCC-based compiler implemented using
existing GNU compiler classes. As the XC32 version and GCC version do
not match mixins have been implemented to override versions used in
versions checks where applicable.
|
|
Defining public API in a cross platform library is painful, especially
on Windows. Since every library have to define pretty much the same
macros, better do it in Meson.
|
|
Allow multiple targets for the same crate name, which is useful when the
same crate is used for both the host and the build machine.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This adds a similar wrapper to the Lex wrapper for yacc/bison/byacc. The
interface is equivalent.
|
|
This module is a bit of a dumping ground for code generators,
particularly ones that are important and non-trivial to wrap, either due
to multiple implementations, major command line changes, or complex
outputs (such as those that may output a directory structure).
The initially provided method is for lex. It provides a simple wrapper
that handles win_flex, reflex, flex, and generic lex.
|
|
This is used for project to require a nightly Rust compiler, and also
for Meson to enable nightly feature if available.
|
|
Fixes: #15028
|
|
|
|
Cuda, for example, doesn't use `prefer_static`, and will always link
statically unless the static value is explicitly set to `true`. This
updates the documentation to reflect that.
|
|
|
|
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
This reverts https://github.com/mesonbuild/meson/pull/15107
Explicit objections regarding the design were raised and not answered,
so it shouldn't have been merged. It needs to be discussed and
revisited.
|
|
|
|
This includes cleaning up some of the type handling to account for
cleanups that are done at the DSL level.
|
|
|
|
|
|
|
|
|
|
The `rc.exe` resource compiler neither provides *depfile* support nor
allows showing includes, as is possible with C or C++ compilers.
Therefore, changes to files included by the `.rc` file did not trigger
recompilation of the resource file.
A workaround was added to *meson* by calling the preprocessor on the
`.rc` file to detect the included headers and adding the result as a
dependency to the resource compilation.
|