From adf9f344a7066458fe33faca62654fc73a67620a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 25 Aug 2025 15:24:30 +0200 Subject: cargo: only create dependencies if there is a [lib] table In the long term, dependencies that do not have a [lib] table will not create an invocation of override_dependency; do not expect there to be a handwritten meson.build that does it. In particular, this is the case for extra-dep-1-rs in the "rust/22 cargo subproject" test case, so change that to use the extra_deps mechanism instead to invoke the subproject. Signed-off-by: Paolo Bonzini --- mesonbuild/cargo/interpreter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild') diff --git a/mesonbuild/cargo/interpreter.py b/mesonbuild/cargo/interpreter.py index 2b360fe79..bf5100870 100644 --- a/mesonbuild/cargo/interpreter.py +++ b/mesonbuild/cargo/interpreter.py @@ -485,7 +485,8 @@ class Interpreter: for depname in pkg.required_deps: dep = pkg.manifest.dependencies[depname] dep_pkg = self._dep_package(pkg, dep) - ast += self._create_dependency(dep_pkg, dep, build) + if dep_pkg.manifest.lib: + ast += self._create_dependency(dep_pkg, dep, build) ast.append(build.assign(build.array([]), 'system_deps_args')) for name, sys_dep in pkg.manifest.system_dependencies.items(): if sys_dep.enabled(pkg.features): -- cgit v1.2.3