aboutsummaryrefslogtreecommitdiff
path: root/rust/hw
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/hw
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/hw')
-rw-r--r--rust/hw/char/pl011/meson.build12
1 files changed, 3 insertions, 9 deletions
diff --git a/rust/hw/char/pl011/meson.build b/rust/hw/char/pl011/meson.build
index 547cca5..494b6c1 100644
--- a/rust/hw/char/pl011/meson.build
+++ b/rust/hw/char/pl011/meson.build
@@ -1,17 +1,11 @@
-subproject('bilge-0.2-rs', required: true)
-subproject('bilge-impl-0.2-rs', required: true)
-
-bilge_dep = dependency('bilge-0.2-rs')
-bilge_impl_dep = dependency('bilge-impl-0.2-rs')
-
_libpl011_rs = static_library(
'pl011',
files('src/lib.rs'),
override_options: ['rust_std=2021', 'build.rust_std=2021'],
rust_abi: 'rust',
dependencies: [
- bilge_dep,
- bilge_impl_dep,
+ bilge_rs,
+ bilge_impl_rs,
qemu_api,
qemu_api_macros,
],
@@ -21,6 +15,6 @@ rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency(
link_whole: [_libpl011_rs],
# Putting proc macro crates in `dependencies` is necessary for Meson to find
# them when compiling the root per-target static rust lib.
- dependencies: [bilge_impl_dep, qemu_api_macros],
+ dependencies: [bilge_impl_rs, qemu_api_macros],
variables: {'crate': 'pl011'},
)])