Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Otherwise we run into issues where the key doesn't match when some
values are empty and others are not. These values can be empty when they
come from `find_external_dependency`, but will be initialized to a
default when they come from the `Interpreter`.
|
|
We're going to use this in the Python module as well.
|
|
|
|
Because we're going to have None once we move to more typed_kwargs
|
|
|
|
This argument requires only the filename, not the path and the actual library
we want to use is the one defined with the soname.
Closes: https://github.com/mesonbuild/meson/issues/14803
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Add support for passing a workspace dictionary and setting fields from it into
the dataclasses.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Add a few fields to "package" that support workspace inheritance.
Complete the Workspace dictionary.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Make the dataclasses closer to the TypedDicts.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Prepare to add type checking.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
It makes sense to make the lib argument optional, so do the same for all
the others as well because optional arguments must all go together.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Path cannot be empty and according to Cargo documentation these are
always of bin type.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Extracted from a patch by Xavier Classens.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Start introducing a new simpler API for conversion of TypedDicts to
dataclasses, and use it already for Cargo.lock.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Create the dataclasses directly from the raw dictionaries, without an intermediate
step.
Extracted from a patch by Xavier Classens.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
There are really many arguments, so use keyword arguments to be safe.
While at it, move the function inside the dataclass.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fix a few issues:
* Cargo.lock's version is an int
* Different BuildTargets have different types for the argument of from_raw
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
|
A cargo package can build multiple crate types for the same library.
Using the same name in meson.override_dependency() fails.
[pbonzini: adjust documentation]
|
|
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.
|
|
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.
|
|
Fixes #14538.
Resolve the source file path before searching .editorconfig files,
to ensure parents up to the root directory are visited.
|
|
|
|
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 (!!!)
|
|
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.
|
|
|
|
coredata.get_external_link_args always returns a list
|
|
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.
|
|
|
|
|
|
When giving a dependency object as requires, allow to use the dependency from a
subproject (that is an InternalDepdency).
|
|
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
|
|
_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)
|
|
This requires g-ir-scanner >=1.85.0, if this isn't the case we'll just
fail.
|
|
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.
|
|
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.
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Makes the code more similar to the earlier loop for generated sources.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|