mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
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>
This commit is contained in:
parent
dc14243193
commit
1297b285cc
4 changed files with 23 additions and 23 deletions
|
@ -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,
|
||||
],
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue