diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-12 11:54:11 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-10 18:44:06 +0100 |
commit | f3a6e9bc475504152e45e5fbf86c756157438d08 (patch) | |
tree | bf2b50dbc0737a3945e0a475eae106aa80f2e529 /rust | |
parent | cb7ada5409f171dae364f206a7fe3ff30fcba7cb (diff) | |
download | qemu-f3a6e9bc475504152e45e5fbf86c756157438d08.zip qemu-f3a6e9bc475504152e45e5fbf86c756157438d08.tar.gz qemu-f3a6e9bc475504152e45e5fbf86c756157438d08.tar.bz2 |
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>
Diffstat (limited to 'rust')
-rw-r--r-- | rust/qemu-api/meson.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build index 3be7b7e..5df6b35 100644 --- a/rust/qemu-api/meson.build +++ b/rust/qemu-api/meson.build @@ -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'] |