| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
This allows us to check that all of the keyword arguments are of the
correct type.
|
|
|
|
It was wasteful, but also failed when the .wrap file miss that
dependency from [provide] section and no Cargo.lock file provide it
either.
|
|
A cargo subproject can fallback to a regular Meson subproject in the
case it has system-deps.
|
|
Fixes: #12519
|
|
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.
|
|
|
|
|
|
|
|
|
|
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
|
|
It should fallback to root package, then all members:
https://doc.rust-lang.org/cargo/reference/workspaces.html#the-default-members-field
|
|
|
|
|
|
|
|
That's better namespacing as it's the only user.
|
|
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.
|
|
|
|
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>,
adjusted to make it compile with cargo.
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
Cargo workspaces will use this to have a single subproject defining
multiple crates.
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
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>
|
|
Extracted from a patch by Xavier Claessens <xclaessens@netflix.com>
|
|
Take the key/value separator `=` into account when comparing long and
short option names to avoid invalid matches.
|
|
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>
|
|
https://github.com/actions/runner-images/issues/12045
|
|
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>
|
|
No one is accessing backend.interpreter anymore, get rid of it
to avoid future temptations.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|