mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20: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
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue