summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-08-01cargo: Move toml implementation into its own moduleXavier Claessens
2025-08-01cargo: Convert PackageState into a dataclassXavier Claessens
2025-08-01cargo: Reconfigure when any Cargo.toml is modifiedXavier Claessens
2025-08-01cargo: Use -rs suffix only for rust ABIXavier Claessens
A cargo package can build multiple crate types for the same library. Using the same name in meson.override_dependency() fails. [pbonzini: adjust documentation]
2025-08-01wrap: wraps from subprojects can replace directories found with no wrapXavier Claessens
If main project finds a directory subprojects/foo with no corresponding foo.wrap, it creates a dummy PackageDefinition for it. If we later find a subproject that has foo.wrap, replace the dummy wrap with it. This happens for example when wrap-redirect have been deleted. It also happens for subprojects downloaded from some Cargo.lock which does not create a wrap-redirect. Avoid loading the same location twice, which can happen when preparing cargo subprojects.
2025-08-01unittests/cargotests: fix pylintPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-08-01Condense test directory names for 1.9.Jussi Pakkanen
2025-08-01format: add --source-file-path argument for stdinCharles Brunet
Fixes #14539. Otherwise, .editorconfig is read from current working directory, and there is no way to know what file name to filter to choose the right section of editor config.
2025-08-01format: use absolute paths to find .editorconfigCharles Brunet
Fixes #14538. Resolve the source file path before searching .editorconfig files, to ensure parents up to the root directory are visited.
2025-08-01call determine_rpath_dirs only when linker requires itCharles Brunet
2025-08-01Optimize determine_rpath_dirsCharles Brunet
When generating targets in ninja backend for my project, `determine_rpath_dirs` is the second most expensive function call. Here are some optimizations: - early exit when iterating for rpath arguments - compute system_dirs and external_rpaths once per target instead of recomputing them for every link args of the target (!!!)
2025-08-01move rpath functions from Backend to BuildTargetCharles Brunet
It is more logical, since those functions depend on a build target, and do not require anything specific to the backend. Furthermore, it will allow us to call determine_rpath_dirs from the linker in a following commit, without the need to depend on the backend.
2025-08-01typing: determine_rpath_dirs is only called with BuildTargetCharles Brunet
2025-08-01simplify get_external_rpath_dirsCharles Brunet
coredata.get_external_link_args always returns a list
2025-08-01wrap: Add basic sftp support to wrap.get_data()Amp Tell
This requires any credentials to be supplied in the url, or some other means of authentication (such as an identity file configured for the user) to be used. Supplying a password in the URL is not supported.
2025-08-01wrap: Break out hash_file() functionAmp Tell
2025-08-01wrap: Slightly improve error message on wrap get failureAmp Tell
2025-08-01modules/pkgconfig: Resolve dependencies in case of an internal dependencyCorentin Noël
When giving a dependency object as requires, allow to use the dependency from a subproject (that is an InternalDepdency).
2025-08-01gnome: make ToolType an alias and use itFlorian "sp1rit"​
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2025-08-01gnome: early exit from _gir_has_option if g-ir-scanner is executableFlorian "sp1rit"​
_gir_has_option runs g-ir-scanner --help | grep <option> to determine if the current version of g-ir-scanner supports a particular option. This already early exists if g-ir-scanner is a OverrideProgram, as it cannot be executed if it is (technically OverridePrograms can actually be executed during configure time, but not g-ir-scanner; as it depends on native modules). Do the same in case g-ir-scanner is an executable (it currently isn't but I might want to move it into one, as to avoid the rule-dependency issue with the aforementioned native module)
2025-08-01gnome: support generate_gir on cross buildsFlorian "sp1rit"​
This requires g-ir-scanner >=1.85.0, if this isn't the case we'll just fail.
2025-08-01gnome: Provide fallback for legacy gi-scanner without --versionFlorian "sp1rit"​
The --version argument was only added in g-ir-scanner 1.58, but the bionic ci still uses g-ir-scanner 1.56. Don't fail if that is the case and assume the version comparison is void.
2025-08-01gnome: Don't rely on gobject-introspection-1.0 anymoreFlorian "sp1rit"​
There isn't really any point in doing this, given that it doesn't provide any headers & libraries by itself and means projects that conditionally build introspection behind a feature only need to check for the existence of g-ir-scanner, not gobject-introspection-1.0 anymore.
2025-07-31Convert builddist to a Python script.Jussi Pakkanen
2025-07-31Guard against use of Unix tools.Jussi Pakkanen
2025-07-29Replace deprecated setup.py install commandCharles Brunet
In `run_meson_command_tests.py`. Replace it with `pip install .` if `pip` is available. Replace it with 'gpep517 install-from-source` if available. Else keep the old behaviour. Fixes #14522.
2025-07-29subprojects: add --filter optionPaolo Bonzini
2025-07-29subprojects: allow passing a fnmatch patternPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29build: allow non-Rust files in non-structured sourcesPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29test cases: add test for mixed Rust/C++ executablePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29docs: update for mixed Rust/non-Rust sourcesPaolo Bonzini
2025-07-29ninjabackend: pass objects to generate_rust_target from non-Rust sourcesPaolo Bonzini
Make generate_rust_target essentially a replacement from generate_link, plus the actual generation of rustc compiler arguments. Remove the parts (especially flatten_object_list and get_fortran_order_deps) that generate_target already does, and add any objects files that were produced by compiling non-Rust sources. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29build: allow picking 'rust' as a link_languagePaolo Bonzini
rustc only needs to be a linker if there are any Rust-ABI dependencies. Skip it whenever linking to a C-ABI dependency. This makes it possible for Meson to pick 'rust' whenever it sees Rust sources, but not whenever it sees Rust used by a dependency with "rust_abi: 'c'". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29build: use PIE for Rust as wellPaolo Bonzini
Ensure that mixed Rust/C executables compile the non-Rust translation units with a compatible relocation model. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29ninjabackend: handle specially TUs where compilation and linking happens ↵Paolo Bonzini
together Rust sources are not compiled separately: generation of the .a or .so or binary happens at the same time as compilation. There is no separate compilation phase where the .o file is created. In preparation for moving generate_rust_target where generate_link is now, make the compilation phase of generate_target skip them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29ninjabackend: remove one level of indentation from for loopPaolo Bonzini
Makes the code more similar to the earlier loop for generated sources. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29ninjabackend: move generate_generator_list_rules to common codePaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29build: reject invalid link_language for Rust targetsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29test cases: avoid missing_abi warning with recent RustPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-29fix formatting issue in the previous commitEli Schwartz
2025-07-29c: add more exceptions to -Wno-*Henrik Lehtonen
Commit eca1ac18dc1978b15b500c9f1710c05cb1ccc0ec (#14252) added support for properly detecting the -Wno-vla-larger-than flag: a value must be specified for its positive form (-Wvla-larger-than=N), or GCC will exit with the error "missing argument to ‘-Walloc-size-larger-than=’". There is a handful of other -Wno-* flags whose positive form act in the same manner, but are not covered here: * -Wno-alloc-size-larger-than (GCC >=7.1.0) * -Wno-alloca-larger-than (GCC >=7.1.0) * -Wno-frame-larger-than (GCC >=4.4.0) * -Wno-stack-usage (GCC >=4.7.0) Add logic to treat these in the same way. Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
2025-07-28docs: Reduce reading comprehension requirements for install functionsNirbheek Chauhan
As we are becoming more popular, the docs have to be clearer because we're being exposed to a wider base of users with highly variable English language ability. Some of those can be helped with translations, but for the rest, let's repeat ourselves. Fixes https://github.com/mesonbuild/meson/issues/14843
2025-07-25Add swift_module_name target argumentKatalin Rebhan
Allows explicitly setting the Swift module name. By default, this is set to the target name, which we might want to change for various reasons, for example when it isn't a valid module name, or when building two targets with the same module name (e.g. a host and native variant).
2025-07-25build/process_compilers: Skip throwing error for headersFlorian "sp1rit"​
Dependencies should be able to provide headers in its sources, even tho the target which uses the dependency may not use the language that header is for. A specific example is vala, where C and Vala dependencies share the same name, so in meson they ought to share the same dependency object in order to provide a Vala and/or C dependency depending on who is using it. Doing so right now however fails, if the project of the dependency user doesn't list vala in its used languages, even tho they might just be interested in the C part of the dependency.
2025-07-24Add suffix function to the fs moduleJouke Witteveen
2025-07-24Work around os.path.isabs bug in fs moduleJouke Witteveen
2025-07-24Restructure fs module in terms of os.pathJouke Witteveen
2025-07-24Add -parse-as-library to Swift library targetsKatalin Rebhan
2025-07-22mintro: Record rpath_dirs_to_remove in install_planDaniele Nicolodi
This is required by meson-python to fix RPATH entries when building a wheel.
2025-07-22unittests: allow running with pytest/unittest directlyChristoph Reiter
Currently the unittests are not runnable with pytest or unittest without going through the run_unittests.py wrapper, or setting certain env vars like MESON_UNIT_TEST_BACKEND. This has that downside that the common "pytest ..." fails and integration with things like VSCode fails too. To work around that we set everything that is needed to run the tests in __init__.py and run_unittests is only one more variant to invoke them by providing different defaults and settings. To make sure that pytest/unittest discover and run_unittests don't diverge implement an automatic test discovery in run_unittests to avoid hardcoding the tests to run there. There shouldn't be any functional changes.