diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-26 09:22:20 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-28 19:35:55 +0200 |
commit | 1297b285cc3ffbd06dc3208fbecdb2d582c535dc (patch) | |
tree | 791df3138861b2f605569a570a39684d377277e6 /rust/qemu-api-macros | |
parent | dc1424319311f86449c6825ceec2364ee645a363 (diff) | |
download | qemu-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-macros')
-rw-r--r-- | rust/qemu-api-macros/meson.build | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/rust/qemu-api-macros/meson.build b/rust/qemu-api-macros/meson.build index 6f94a4b..8610ce1 100644 --- a/rust/qemu-api-macros/meson.build +++ b/rust/qemu-api-macros/meson.build @@ -1,11 +1,3 @@ -subproject('proc-macro2-1-rs', required: true) -subproject('quote-1-rs', required: true) -subproject('syn-2-rs', required: true) - -quote_dep = dependency('quote-1-rs', native: true) -syn_dep = dependency('syn-2-rs', native: true) -proc_macro2_dep = dependency('proc-macro2-1-rs', native: true) - _qemu_api_macros_rs = rust.proc_macro( 'qemu_api_macros', files('src/lib.rs'), @@ -16,9 +8,9 @@ _qemu_api_macros_rs = rust.proc_macro( '--cfg', 'feature="proc-macro"', ], dependencies: [ - proc_macro2_dep, - quote_dep, - syn_dep, + proc_macro2_rs_native, + quote_rs_native, + syn_rs_native, ], ) |