summaryrefslogtreecommitdiff
path: root/mesonbuild/cargo/interpreter.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-25 15:24:30 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-10-29 11:34:19 -0700
commitadf9f344a7066458fe33faca62654fc73a67620a (patch)
treef6067987e6bb07ddc71c518da94bbaa988eecd64 /mesonbuild/cargo/interpreter.py
parent06a9a6d1d3f9941fd3748598f5443e9695bee073 (diff)
downloadmeson-adf9f344a7066458fe33faca62654fc73a67620a.tar.gz
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 <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/cargo/interpreter.py')
-rw-r--r--mesonbuild/cargo/interpreter.py3
1 files changed, 2 insertions, 1 deletions
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):