summaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)Author
2025-12-04interpreter: validate argument to string.split() for empty stringDylan Baker
The underlying Python implementation throws in this case, and I'm not sure what the correct result here would be if we allowed it. Convert to None and don't split? Split every character? I've gone with throwing InvalidArguments, which maintains the current behavior of "doesn't work" but with a nicer output. Any other change would require a FeatureNew anyway, and can wait till 1.11. Fixes: #15335
2025-12-01rust: Rust-ABI dynamic libraries do not support LTOPaolo Bonzini
Attempting to use LTO on e.g. a procedural macro crate fails with error: lto cannot be used for proc-macro crate type without -Zdylib-lto Do not return -Clto for such crate types. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-12-01compilers: pass target to get_lto_*_argsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-12-01fix crate name in rust-project.jsonPaolo Bonzini
Include the real crate name, with "_" instead of "-" and without the Meson-specific "+foo" suffix. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-12-01Bump version number for rc2.Jussi Pakkanen
2025-12-01templates: simplify (whitespace, flatten array)Sam James
2025-12-01templates: fix remaining languages for source file discovery tooSam James
I missed this in 9104bb616766bd9a05f0b2f280359463d32e227d as we were only testing whitelisted languages for source file discovery. Tests now handle all of these by using the map we have in compilers, as we need to know the suffix to use for the invalid source files we inject. Note that for tests, we mix explicit --lang in some cases and not others, which we could probably do better with. For these 'must fail' tests, I've stuck with explicit `--lang` to make sure we're testing what we want, but the others are perhaps up for debate. Bug: https://github.com/mesonbuild/meson/issues/15286
2025-12-01templates: fix --executableSam James
* In 1.7.1, the behaviour of --executable was to just ignore it. * After my recent 9104bb616766bd9a05f0b2f280359463d32e227d, the behaviour was that we'd require, for --executable xyz, xyz.c to exist or we'd fail to generate. Neither are good! Instead, create the sample source file w/ the project name, but call the executable whatever the user passed with `--executable`. Bug: https://github.com/mesonbuild/meson/issues/15286
2025-11-30Bump sln_version_comment to 18 for vs2026 backend.Luke Elliott
Allows version selector to open the correct IDE.
2025-11-30Revert "Detect dependency changes in Windows rc compiler"Jussi Pakkanen
This reverts commit 632115ecff3bd7f9cb519098e04e0467b0cfd3a1.
2025-11-28Wrap `tarfile.fully_trusted_filter` in `staticmethod` for wrap file handling tooSebastian Dröge
That's how it is done in the other two places and without that one argument too many is passed to the filter function: ``` [...] File "/usr/lib/python3.14/site-packages/mesonbuild/wrap/wrap.py", line 607, in _get_file shutil.unpack_archive(path, extract_dir) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/shutil.py", line 1432, in unpack_archive func(filename, extract_dir, **kwargs) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/shutil.py", line 1349, in _unpack_tarfile tarobj.extractall(extract_dir, filter=filter) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/tarfile.py", line 2409, in extractall tarinfo, unfiltered = self._get_extract_tarinfo( ~~~~~~~~~~~~~~~~~~~~~~~~~^ member, filter_function, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/tarfile.py", line 2496, in _get_extract_tarinfo filtered = filter_function(unfiltered, path) TypeError: fully_trusted_filter() takes 2 positional arguments but 3 were given ```
2025-11-28templates: Define a macro for pubic APIs on OS/2KO Myung-Hun
2025-11-28modules/snippets: Define a macro for public APIs on OS/2KO Myung-Hun
2025-11-28interpreter: Add a slice() method to arraysJouke Witteveen
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.
2025-11-28Simplify to_list implementation for custom targetsJouke Witteveen
2025-11-26vsenv: Use a python script to pickle envXavier Claessens
This is safer than parsing env from stdout
2025-11-25Rewriter: Handle unknown write targetsEyal Itkin
Add error checks for cases in which the write target is unknown and ensure all error cases indeed abort the execution to avoid internal crash. Resolves #13502. Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
2025-11-23Bump version number for 1.10 rc1.Jussi Pakkanen
2025-11-23compilers: forward gen_vs_module_defs_args to linkerPaolo Bonzini
This adds support for DEF files to rust and removes some hasattr duck typing. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-23linkers: add gen_vs_module_defs_argsPaolo Bonzini
.def files are a linker concept, and they should not be shoehorned into the Compiler. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-23templates: respect parametersSam James
Respect collected sources for `meson init` as well as --executable. This regressed in 9f0ac314ba0c54cc18c2499845324efc14c1849e (part of https://github.com/mesonbuild/meson/pull/14086, it's easier to see how with the whole PR). Also, add subtests (distinguishing between empty directories and those with some file(s) within). We already had some of these but they weren't marked as such. Test `meson init` with a broken source file in the source directory as we should fail with that, not ignore the file. It's easier to test with a broken file than a working one as we can assert the build should fail, it'll pass with just the 1 example file we generate. Closes: https://github.com/mesonbuild/meson/issues/15286
2025-11-23Add import std support to MSVC.Jussi Pakkanen
2025-11-23Add basic import std support for GCC.Jussi Pakkanen
2025-11-23Add cpp_importstd option.Jussi Pakkanen
The reason it is a string array is that this allows us to add more values than true/false should it be needed. For an example see `b_lto`.
2025-11-21rewrite: fix duplicate objects for predefined globalsPaolo Bonzini
Global objects are treated as UnknownValue(), but unlike other variables their object is created on every call to get_cur_value_if_defined() instead of coming from a dictionary. This causes the dataflow DAG to have multiple objects from the same object. Fix this by building the UnknownValues at interpreter construction time. Fixes: #15261 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-19compilers/rust: make use the fact we have an Environment to cleanupDylan Baker
This adds a second stage initialization, which allows us to use options for setting attributes on the compiler. This is called during the detect phase, so the Compiler is never used in a partially initialized state.
2025-11-19compilers: Remove Environment parameter from RustCompiler.get_nightlyDylan Baker
2025-11-19compilers: Remove Environment parameter from RustCompiler.lib_file_to_l_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from RustCompiler.get_rustdocDylan Baker
2025-11-19compilers: Remove Environment parameter from RustCompiler.get_rust_toolDylan Baker
2025-11-19compilers: Remove Environment parameter from CLikeCompiler.get_compiler_dirsDylan Baker
2025-11-19compilers: Remove Environment parameter from CLikeCompiler.gen_dynamic_link_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from ↵Dylan Baker
CLikeCompiler._get_basic_compiler_args
2025-11-19compilers: Remove Environment parameter from CLikeCompiler.output_is_64bitDylan Baker
2025-11-19compilers: Remove Environment parameter from CLikeCompiler.has_argumentsDylan Baker
2025-11-19compilers: Make CudaCompiler.get_ccbin_args privateDylan Baker
It's not used outside of the compiler.
2025-11-19compilers: Remove Environment parameter from CudaCompiler.get_ccbin_argsDylan Baker
2025-11-19compilers: Remove CoreDAta parameter from Compiler.cached_compileDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.get_defineDylan Baker
2025-11-19Compilers: make CLikeCompiler.cross_compute_int privateDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.compute_intDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.has_membersDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.has_typeDylan Baker
2025-11-19compilers: Remove Environment parameter from ↵Dylan Baker
Compiler.symbols_have_underscore_prefix
2025-11-19compilers: Remove dead "update_options" methodDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.get_option_compile_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.get_option_std_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.get_option_link_argsDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.check_headerDylan Baker
2025-11-19compilers: Remove Environment parameter from Compiler.has_headerDylan Baker