mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 23:02:44 +00:00
rust: apply --cfg MESON to all crates
We might have more uses for --cfg MESON, even though right now it's only qemu-api that has generated files. Since we're going to add more flags to the add_project_arguments calls for Rust, it makes sense to also add --cfg MESON everywhere. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
72d6ed19bf
commit
8c28667503
@ -3422,10 +3422,11 @@ if have_rust
|
|||||||
# is safe; https://github.com/rust-lang/rust/pull/54675 says that
|
# is safe; https://github.com/rust-lang/rust/pull/54675 says that
|
||||||
# passing -nodefaultlibs to the linker "was more ideological to
|
# passing -nodefaultlibs to the linker "was more ideological to
|
||||||
# start with than anything".
|
# start with than anything".
|
||||||
add_project_arguments(rustc_args + ['-C', 'default-linker-libraries'],
|
add_project_arguments(rustc_args +
|
||||||
|
['--cfg', 'MESON', '-C', 'default-linker-libraries'],
|
||||||
native: false, language: 'rust')
|
native: false, language: 'rust')
|
||||||
|
add_project_arguments(rustc_args + ['--cfg', 'MESON'],
|
||||||
add_project_arguments(rustc_args, native: true, language: 'rust')
|
native: true, language: 'rust')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
hxtool = find_program('scripts/hxtool')
|
hxtool = find_program('scripts/hxtool')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
_qemu_api_cfg = ['--cfg', 'MESON']
|
_qemu_api_cfg = []
|
||||||
# _qemu_api_cfg += ['--cfg', 'feature="allocator"']
|
# _qemu_api_cfg += ['--cfg', 'feature="allocator"']
|
||||||
if rustc.version().version_compare('>=1.77.0')
|
if rustc.version().version_compare('>=1.77.0')
|
||||||
_qemu_api_cfg += ['--cfg', 'has_offset_of']
|
_qemu_api_cfg += ['--cfg', 'has_offset_of']
|
||||||
|
Loading…
Reference in New Issue
Block a user