mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 11:53:53 -06:00

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>
19 lines
434 B
Meson
19 lines
434 B
Meson
_qemu_api_macros_rs = rust.proc_macro(
|
|
'qemu_api_macros',
|
|
files('src/lib.rs'),
|
|
override_options: ['rust_std=2021', 'build.rust_std=2021'],
|
|
rust_args: [
|
|
'--cfg', 'use_fallback',
|
|
'--cfg', 'feature="syn-error"',
|
|
'--cfg', 'feature="proc-macro"',
|
|
],
|
|
dependencies: [
|
|
proc_macro2_rs_native,
|
|
quote_rs_native,
|
|
syn_rs_native,
|
|
],
|
|
)
|
|
|
|
qemu_api_macros = declare_dependency(
|
|
link_with: _qemu_api_macros_rs,
|
|
)
|