summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-10-20interpreter: port dependency not_found_message to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency native to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency modules to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency method to typed_kwargsDylan Baker
This allows us a bunch of nice things: 1. We can use the DependencyMethods enum everywhere 2. The deprecated methods can be checked in the Interpreter, so we can now emit deprecation warnings for stuff that was deperecated in 0.44! 3. We can share this more strongly typed method everywhere
2025-10-20interpreter: port dependency main to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency language to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency include_type to typed_kargsDylan Baker
The cleanup this allows lower down points out that we don't properly validate the value passed to `as_system()`. I have no idea what happens if you pass a non-valid value, but it's a bug and I've simply made it a hard error. We can re-assess if necessary.
2025-10-20interpreter: port dependency fallback to typed_kwargsDylan Baker
2025-10-20interpreter: port dependencies components to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency cmake_package_version to typed_kwargsDylan Baker
2025-10-20interpreter: port dependency cmake_module_path to typed_kwargsDylan Baker
2025-10-20interpreter: port cmake_args to typed_kwargsDylan Baker
2025-10-20dependency: Use a TypedDict to describe the keyword arguments to DependencyDylan Baker
This allows us to check that all of the keyword arguments are of the correct type.
2025-10-20interpreter: port dependency(allow_fallback) to typed_kwargsDylan Baker
2025-10-20cargo: Do not look pkg in subprojects when we have its manifestXavier Claessens
It was wasteful, but also failed when the .wrap file miss that dependency from [provide] section and no Cargo.lock file provide it either.
2025-10-20cargo: do not propagate cargo interpreter when doing sysdep fallbackXavier Claessens
A cargo subproject can fallback to a regular Meson subproject in the case it has system-deps.
2025-10-20interpreter: Fix extract_object subproject validationXavier Claessens
Fixes: #12519
2025-10-20build: Ensure that `vala_*` properties always exist, and are correctDylan Baker
This allows us to do a lot less proxy checking for vala, and lot more "If this thing says it's going to output vala, it's going to output vala. By only setting them when they use vala, we can also be sure that the fields aren't meaningless.
2025-10-20interpreter|build: Add type checking for vala specific argumentsDylan Baker
2025-10-20Fix typos in authorship informationVlad-Stefan Harbuz
2025-10-20Add reconstructed authorship information to mesonbuild/utils/vsenv.pyVlad-Stefan Harbuz
2025-10-20vulkan: Fix Vulkan detection when cross-compiling to WindowsGodvin Ouseph
2025-10-17make wrap search custom subprojects dirsCharlie Hutcheson
Changes from Dylan: - Don't use Path - merge the lint fixes - Fix some typing issues - Handle non-meson projects - Remove some code duplication by putting `get_subproject_dir` in utils
2025-10-17cargo: Handle the case default-members is not definedXavier Claessens
It should fallback to root package, then all members: https://doc.rust-lang.org/cargo/reference/workspaces.html#the-default-members-field
2025-10-17cargo: version is optionalPaolo Bonzini
2025-10-17cargo: define 'features' variable to be used in meson/meson.buildXavier Claessens
2025-10-17cargo: document that it is recommended to use workspacesXavier Claessens
2025-10-17cargo: Move _depv_to_dep() inside Dependency classXavier Claessens
That's better namespacing as it's the only user.
2025-10-17cargo: raw.Manifest can be any Cargo.tomlXavier Claessens
raw.Manifest represents any Cargo.toml file, a package, a workspace, or both. However, the Manifest dataclass can only be a package, and the Workspace dataclass is a workspace with an optional root package.
2025-10-17cargo: Keep a list of build_def_filesXavier Claessens
2025-10-17cargo: Small simplification in path joinXavier Claessens
2025-10-17test cases: add test for cargo workspacesPaolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>, adjusted to make it compile with cargo.
2025-10-17cargo: support root packages in workspacesPaolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
2025-10-17cargo: support workspacesPaolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
2025-10-17cargo: Allow a cargo subproject to subdir() into another cargo projectXavier Claessens
Cargo workspaces will use this to have a single subproject defining multiple crates.
2025-10-17cargo: refactor _create_project for workspacesPaolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
2025-10-17cargo: split interpret_package() and _create_package()Paolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
2025-10-17cargo: do not process escapes in strings passed to the builderPaolo Bonzini
With workspace support, backslashes can appear in subdir() invocations generated by the Cargo interpreter. If the arguments form valid escapes, for example subdir('dir\foo'), the interpreter will parse the '\f' as a single form feed character, and produce errors such as os.makedirs(os.path.join(self.environment.build_dir, subdir), exist_ok=True) File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\os.py", line 223, in makedirs mkdir(name, mode) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'D:\\a\\1\\s\\b c09188aed5\\subprojects\\foo\\dir\x0coo' Use escape=False just like the cmake interpreter does. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-17cargo: extract _prepare_packagePaolo Bonzini
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
2025-10-17options: Fix long/short option mixture detectionTobias Stoeckmann
Take the key/value separator `=` into account when comparing long and short option names to avoid invalid matches.
2025-10-17depfixer: zero-out rpath entry string on removing entryChristian Marangi
While investigating a reproducible problem with a binary compiled with Meson, it was notice that the RPATH entry was never removed. By comparing the binary from 2 different build system it was observed that altough the RPATH entry was removed (verified by the readelf -d command) the actual path was still present causing 2 different binary. Going deeper in the Meson build process, it was discovered that remove_rpath_entry only deletes the entry in the '.dynamic' section but never actually 'clean' (or better say zero-out) the path from the .dynstr section producing binary dependendt of the build system. To address this, introduce a new helper to to zero-out the entry from the .dynstr section permitting to produce REAL reproducible binary. Additional logic was needed to handle GCC linker optimization for dynstr table where the rpath string might be reused for other dym function string. The setion that is actually removed is filled with 'X' following patchelf behaviour. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-17Update Azure image from win2019 to win2022Jussi Pakkanen
https://github.com/actions/runner-images/issues/12045
2025-10-16rust: work around unintuitive behavior of -l:-bundlePaolo Bonzini
When a Rust target depends on an intermediate Rust library (.rlib) which itself has a dependency on a native static library, Meson's generated rustc command line failed to collect and propagate the search paths for these indirect native dependencies, leading to a linker error: error: linking with `cc` failed: exit status: 1 = note: rust-lld: error: unable to find library -l:libf.a collect2: error: ld returned 1 exit status The root cause is that the intermediate .rlib's metadata correctly stores the requirement to link the native library (via the -l flag), but it does not store the library's search path (the -L flag); the responsibility for providing the search path is therefore deferred to the final link command. Ensures that search paths for all transitive dependencies are collected, allowing the final linker invocation to find and correctly link the required native libraries. Reported-by: Martin Kletzander <nert.pinx@gmail.com> Fixes: 018d22482 ("ninjabackend: unify conversion from path to -L/-l", 2025-10-08) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16backend: remove InterpreterPaolo Bonzini
No one is accessing backend.interpreter anymore, get rid of it to avoid future temptations. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16intro: compute meson_variables for dependencies at setup timePaolo Bonzini
Another place where the interpreter is accessed surreptitiously is dependency introspection, which looks at the variables. Do that at setup time instead while the interpreter is alive. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16build, backend: store build_def_files in BuildPaolo Bonzini
The interpreter's build_def_files are the only remaining piece of interpreter state used by the backend. Compute it once and store it in build, using a property to ensure that it's initialized and accessed correctly. This also removes one of the cases in which introspection uses the interpreter object. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16build: do not pass Interpreter to Generator.process_filesPaolo Bonzini
All that is needed is the subdir, pass it explicitly (and make it an optional argument so that the backend does not have to pass it). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16build: store Environment in GeneratorPaolo Bonzini
Objects like targets already store the environment in which they were created, do the same for Generator: pass it to the constructor and use it in process_files. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16build: pass Environment to GeneratedListPaolo Bonzini
GeneratedList does not need the full interpreter, only the source and build directories which can be found in Environment. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-16build: import EnvironmentPaolo Bonzini