aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-26 09:22:20 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-05-28 19:35:55 +0200
commit1297b285cc3ffbd06dc3208fbecdb2d582c535dc (patch)
tree791df3138861b2f605569a570a39684d377277e6 /rust/qemu-api
parentdc1424319311f86449c6825ceec2364ee645a363 (diff)
downloadqemu-1297b285cc3ffbd06dc3208fbecdb2d582c535dc.zip
qemu-1297b285cc3ffbd06dc3208fbecdb2d582c535dc.tar.gz
qemu-1297b285cc3ffbd06dc3208fbecdb2d582c535dc.tar.bz2
rust: make declaration of dependent crates more consistent
Crates like "bilge" and "libc" can be shared by more than one directory, so declare them directly in rust/meson.build. While at it, make their variable names end with "_rs" and always add a subproject() statement (as that pinpoints the error better if the subproject is missing and cannot be downloaded). Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api')
-rw-r--r--rust/qemu-api/meson.build4
1 files changed, 1 insertions, 3 deletions
diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build
index 1696df7..1ea86b8 100644
--- a/rust/qemu-api/meson.build
+++ b/rust/qemu-api/meson.build
@@ -2,8 +2,6 @@ _qemu_api_cfg = run_command(rustc_args,
'--config-headers', config_host_h, '--features', files('Cargo.toml'),
capture: true, check: true).stdout().strip().splitlines()
-libc_dep = dependency('libc-0.2-rs')
-
# _qemu_api_cfg += ['--cfg', 'feature="allocator"']
if get_option('debug_mutex')
_qemu_api_cfg += ['--cfg', 'feature="debug_cell"']
@@ -37,7 +35,7 @@ _qemu_api_rs = static_library(
override_options: ['rust_std=2021', 'build.rust_std=2021'],
rust_abi: 'rust',
rust_args: _qemu_api_cfg,
- dependencies: [libc_dep, qemu_api_macros],
+ dependencies: [libc_rs, qemu_api_macros],
)
rust.test('rust-qemu-api-tests', _qemu_api_rs,