mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
rust: build: move rustc_args.py invocation to qemu-api crate
Only qemu-api needs access to the symbols in config-host.h. Remove the temptation to use them elsewhere by limiting the --cfg arguments to the qemu-api crate. Per-crate invocation of the script will also be needed to add --check-cfg options for each crate's features (when more complex, build-time configurable devices are added in the future). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
cb7ada5409
commit
f3a6e9bc47
2 changed files with 29 additions and 32 deletions
|
@ -1,4 +1,7 @@
|
|||
_qemu_api_cfg = []
|
||||
_qemu_api_cfg = run_command(rustc_args,
|
||||
'--config-headers', config_host_h,
|
||||
capture: true, check: true).stdout().strip().split()
|
||||
|
||||
# _qemu_api_cfg += ['--cfg', 'feature="allocator"']
|
||||
if rustc.version().version_compare('>=1.77.0')
|
||||
_qemu_api_cfg += ['--cfg', 'has_offset_of']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue