2689 Commits

Author SHA1 Message Date
vanadiae
e0e728d556 msetup: Create CACHEDIR.TAG file in build dir
Fixes #11734
2026-06-23 16:32:33 -04:00
Jesper Wramberg
bcd5dd4577 docs: correct dep.as_system() default value
The reference manual states that the optional value argument to
dep.as_system() defaults to 'preserve'. In practice, omitting the
argument makes the dependency use the 'system' include type.

Update the documentation to describe the actual default behavior.

Fixes #13294
2026-06-23 14:24:23 +02:00
Paolo Bonzini
1b4a6498fd docs: fix incorrect return type
The reference manual expects "array[...]", fix the incorrect
type added by PR #14488.

Fixes: #15941
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-06-23 05:26:53 -04:00
Paolo Bonzini
82c25986d7 docs: accept 429 status for github search and topic pages
GitHub queries often returns a 429 Too Many Requests status code
to the runners.  Ignore the error, as it makes CI flaky and a
Too Many Requests result (unlike a 404) is a sign that the
URL itself is ok.

While at it, improve slightly the formatting to avoid this:

>>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MESON_TEST_ITERATION=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=51 /usr/bin/python3 /home/runner/work/meson/meson/docs/./validatelinks.py /home/runner/work/meson/meson/docs/markdown/Users.md
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
"`meson` GitHub
topic" https://github.com/topics/meson 429
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-06-23 05:26:53 -04:00
Gabe Black
a5562ce95a Add to_list() method to include_directories objects
clean up

fix tests for windows paths mimicing what was done in other unit tests (e.g., test case 74)

Update mesonbuild/interpreter/interpreterobjects.py

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>

Update docs/markdown/snippets/include_directories_to_list.md

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>

Update mesonbuild/interpreter/interpreterobjects.py

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>

Update docs/yaml/objects/inc.yaml

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>

Fix comment language
2026-06-19 17:26:06 +02:00
Florian "sp1rit"​
5461ecf31e find_program: Respect --force-fallback-for
Previously, find_program only used the subproject fallback if it didn't
find the tool the normal way or global forcefallback was activated. Now
it should also fall back if the subproject that provides the fallback is
part of force-fallback-for.
2026-06-19 14:39:52 +02:00
Paolo Bonzini
e6bb057839 cargo: implement machine-specific dependency tracking
Change the dependency resolution code to take a MachineChoice as an
argument.  Create build- and/or host-side configurations
through the machines_from() method in Manifest.
2026-06-18 10:47:44 +02:00
Paolo Bonzini
dc559de85a interpreter, rust: add native argument to workspace object
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-06-17 13:05:22 -07:00
Paolo Bonzini
2631a5efc4 interpreter: allow subprojects to be requested for the build machine
The current situation in Meson is that subprojects are always built for
the host machine. This means that while cross compiling, a tool that
must be run on the build machine must have all of its dependencies met
by the system (pkg-config, cmake, config-tool, etc); but dependencies
for the host machine can be built. With this patch subprojects may also
be built for the build machine.

Nothing should ever be installed from a subproject for the build
machine, while cross compiling. However, if we are not cross compiling
they are installed, since Meson can't really tell the difference between
a host and build dependency in that case.

Extracted from a patch by Dylan Baker <dylan@pnwbakers.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-06-17 13:05:22 -07:00
Paolo Bonzini
3cba9ee127 interpreter: add native argument to override_find_program()
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-06-17 13:05:22 -07:00
Paolo Bonzini
ef3dff374c i18n module: add msgfmt_args argument to i18n.gettext
This allows passing additional arguments like `--use-fuzzy`
to msgfmt whenn building the translations.
2026-06-17 19:27:44 +02:00
Zephyr Lykos
a3fe58fea0 docs: mention win_subsystem support in release notes 2026-06-16 07:20:45 +02:00
Paolo Bonzini
5f283facda qt: allow CustomTargetIndex and generators for preprocess
Corresponding to the TypedDict change from the previous patch,
extend the choice of GeneratedTypes to the DSL and not just the
internal dictionaries.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-06-15 16:16:45 +02:00
Paolo Bonzini
4dee8ca1aa wraptool: support installing wraps for multiple projects
Previously, `meson wrap install` took only one argument, so installing
multiple projects needed multiple invocations, which is not too convenient.
So add support for installing multiple projects.
2026-06-13 09:28:15 +02:00
meator
89847a5cc9 docs: Qt6 module: document main kwarg 2026-06-10 11:55:15 +02:00
John Turner
cf48eed25c add clippy-json target
Add a clippy-json target to the ninja script.

This is useful for rust-analyzer, which requires an "external check
command" to function when not using cargo.

Also we add a "clippy-json-prereq" target, and invoke it in the
clippy.py script. The prereq target tries to build as much of the
project as possible with "-k0".
2026-06-08 16:16:47 +02:00
Arthur Grillo
31a1a87bd8 mformat: Make --recursive recurse subprojects with --subprojects flag
Currently, `meson format --recursive` only recurse meson.build files
that are reachable via a `subdir` function. Add `--subprojects` flag to
also recurse subprojects.
2026-06-06 15:51:36 +02:00
Eli Schwartz
ac3ee318dc docs: update release info for my secondary PGP signing key
I have two signing keys. One is an older rsa4096 one, the newer ed25519
key I created when joining the Gentoo Developers team. Both keys are
still valid, and the newer key is signed by the older key.

When tagging release 1.11.1, I mistakenly uploaded assets signed by the
newer key, which should not actually be a big deal but was confusing
since it was not on this page. Update the docs so that people know this
key is acceptable.

Proofs for the new key:

- cross-sig from the old to new key

- recorded by https://github.com/eli-schwartz.gpg as a known key for me

- recorded by https://codeberg.org/eschwartz.gpg as a known key for me

- this git commit adding the new key to the docs page is signed by the
  old key

- my online identity as a Gentoo Developer is associated with this key
  as observable via:
  https://wiki.gentoo.org/wiki/User:Eschwartz
  https://www.gentoo.org/inside-gentoo/developers/#eschwartz

Fixes: https://github.com/mesonbuild/meson/issues/15901
2026-06-05 13:48:31 -04:00
Gurchetan Singh
5c8df00229 Add initial detection for Fuchsia
Fuchsia is a microkernel-like OS that takes many cues from Plan9.

Co-Authored-by: Dylan Baker <dylan@pnwbakers.com>
2026-06-04 13:48:10 -07:00
Charles Brunet
db767256de Fix recursion for i18n.xgettext
[Paolo: add test]
2026-06-04 18:17:40 +02:00
Hunter Kvalevog
44c3b9ccf0 cmake: fix typo in documentation 2026-06-04 10:37:26 +02:00
Zephyr Lykos
b916f7bd44 dependencies: support custom stdatomic lookup for MSVC
Closes: https://github.com/mesonbuild/meson/issues/14233
Fixes: f070670e77
2026-05-27 14:20:21 -07:00
Paolo Bonzini
cf2c9d13c4 mformat: allow --recursive --check-diff
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-27 20:02:27 +02:00
Chris Down
26f902714d interpreter: Add hex/octal/binary support to str and int primitives
Add support for parsing and formatting integers in hexadecimal, octal,
and binary representations to complement the existing decimal support.

str.to_int() now accepts strings with 0x/0o/0b prefixes and optional
leading signs (+/-), enabling direct parsing of hex, octal, and binary
literals while maintaining full backward compatibility with decimal
strings including those with leading zeros.

int.to_string() gains a new format keyword argument that accepts 'dec',
'hex', 'oct', or 'bin', allowing integers to be formatted with
appropriate prefixes (0x, 0o, 0b). The format parameter works correctly
with the existing fill parameter and handles negative numbers properly.

Round-trip conversions are fully supported: values formatted with
int.to_string(format: 'hex') can be parsed back with str.to_int().

Fixes: #2047
Fixes: #15201
2026-05-27 12:47:48 +02:00
Paolo Bonzini
89a5cc031b cargo: glob-expand workspace members
Cargo.toml workspace members are glob expressions, which we'd rather
not rely on.  Treat them always as non-default members, so that they
have to be listed explicitly in extra_members but are nevertheless
available.

Co-authored-by: Florian sp1rit <sp1rit@disroot.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-23 09:05:07 +02:00
Paolo Bonzini
d1ac05c9a9 rust: add extra_members kwarg for workspace()
Cargo allows building non-default workspace members via the -p
option.  Within Meson, we still want to do a single configuration
process for the workspace, but we need to add any non-default
members (typically chosen via machine objects and/or Meson options)
at the time workspace() is invoked.  Add a new argument to
workspace() for this.

Co-authored-by: Florian sp1rit <sp1rit@disroot.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-23 09:05:07 +02:00
Paolo Bonzini
250f0c6b6e cargo: raise error early if using an unconfigured package
Instead of raising an exception for accessing a field of a NoneType,
report a Meson error and omit the entry from packages().

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-22 08:04:41 +02:00
FeRD (Frank Dana)
cf0c0cfbe3 refman: Also fix 'feture' spelling in loaderyaml 2026-05-19 15:59:36 +02:00
FeRD (Frank Dana)
75ddbed344 refman: spelling: FetureCheck -> FeatureCheck 2026-05-19 15:59:36 +02:00
Ludovic Rousseau
cff370d349 Documentation: remove duplicated text
and fix a grammatical error.
2026-05-17 15:55:03 +02:00
Paolo Bonzini
1695fbc7e8 apply -werror=true when linking
Fixes: #11318
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-14 18:28:37 +02:00
Paolo Bonzini
4393d7cb07 interpreter: allow files for *_args
The type check fix in _BASE_LANG_KW is all that's needed since
__convert_file_args already handles File objects correctly (converts
to path string + adds to depend_files for rebuild tracking). In fact,
the vala_args case 569 already had (str, File).  This just brings
the other languages in line.

Fixes: #1633
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-14 18:28:37 +02:00
Dylan Baker
eafdbd392b docs: Update docs on include_directories and d_import_dirs
Hopefully this will help make it clearer for D that an import_dir is
just another use of include_directories
2026-05-08 18:11:44 +02:00
Yelninei
445a4325be generate_dub_file: Compatibility with dub >= 1.41.0. 2026-05-08 15:31:57 +01:00
Yelninei
989ae6ed6d generate_dub_file: Don't use deprecated meson variables. 2026-05-08 15:31:57 +01:00
Paolo Bonzini
92f0ce787e docs: tweak depends for features added in 1.12.0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-07 20:52:21 +02:00
Paolo Bonzini
16bf9932bc docs: add release notes for external programs in input and depends
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-07 20:52:21 +02:00
Paolo Bonzini
0fea57bd98 interpreter: allow Program as an element of "depends"
Previous version of Meson were returning an Executable instead of
the LocalProgram.

While at it, add CustomTargetIndex to the type as well - it is
included in the KwargInfo but not in the TypedDict.

Fixes: #15774
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-07 20:52:21 +02:00
Paolo Bonzini
8035ea6f5c interpreter: allow Program for custom_target inputs
Previous version of Meson were returning an Executable instead of
the LocalProgram, so allow it again; use a convertor so that
the LocalProgram is resolved to the underlying file or target.
Add support for ExternalProgram while at it.

Fixes: #15774
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-05-07 20:52:21 +02:00
Dylan Baker
7b6c3a0f7a docs: Add a release snippet for Python 3.10 requirement 2026-05-04 08:44:29 +02:00
Sam James
16a7472802 mtest: support --exclude
Support `--exclude name` where `name` is a full test name, optionally
including the subproject name. Wildcards are not currently supported.

Accept both `name` for the main project and `subproject:name`. We want `name`
for convenience so users don't have to write out their project name when
no subprojects are involved.

Extended matching could be added in future, but the primary usecase for
this is where distributions want to skip known-buggy or irrelevant tests,
rather than developers working on their own project.

The test changes are a bit noisy because needed to add a test with
the same name in the main project and a subproject to check that --exclude
w/ an unqualified name only affected the main parent, but adding 2 new failing
tests required all the numbers to be adjusted.

Closes: https://github.com/mesonbuild/meson/pull/11502
Closes: https://github.com/mesonbuild/meson/issues/6999
Signed-off-by: Sam James <sam@gentoo.org>
2026-04-27 13:34:07 +01:00
Eli Schwartz
40023e00ea Revert "modules: fs: accept build targets as fs.copyfile() source"
This reverts commit 74faddbb44.

It is vibe-coded and also seems to have gotten merged without discussion
of what the point of this is supposed to be. There's no motivating use
case to point at, which normally should be a given? It's a lot of code
in order to support cp'ing an executable()? Is this a sign that humans
weren't involved in choosing to try implementing this?
2026-04-23 20:42:20 -04:00
Dylan Baker
30599dfb98 Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
Dylan Baker
be8fa9d468 ci: Drop ubuntu bionic
There is no support for Python 3.10, so we can drop this.
2026-04-23 14:01:23 -07:00
Marc-André Lureau
74faddbb44 modules: fs: accept build targets as fs.copyfile() source
Allow CustomTarget, CustomTargetIndex, and BuildTarget as the first
argument to fs.copyfile(), so that build artifacts can be copied
without resorting to a manual custom_target.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2026-04-23 18:15:14 +02:00
Rachel
3d7600790a Support depends in generator.process 2026-04-23 09:55:25 +01:00
Paul Caprioli
958d3b2a3e modules: fs: Add build_subdir argument to fs.copyfile()
Co-developed-by: Paul Caprioli <paul@hpkfft.com>
2026-04-21 16:54:29 +01:00
Paul Caprioli
a5c0e85c3a docs: Add FAQ entry about build target destination
(Extracted from Paul's patch in #14734).
2026-04-21 16:54:29 +01:00
Paolo Bonzini
c005d15b46 gnome: allow custom targets as a source for gnome.genmarshal
The function is using source_strings_to_files, and that makes
it trivial to pass generated sources to the CustomTarget
constructor.

Fixes: #2748
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-04-21 07:57:45 -07:00
Paolo Bonzini
68b6733c49 modules: gnome: do not pass strings to CustomTargets
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-04-21 07:57:45 -07:00