mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
rust: make rustfmt optional
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c2988dfbb0
commit
5b1b5a8ae4
1 changed files with 11 additions and 0 deletions
11
meson.build
11
meson.build
|
@ -117,6 +117,10 @@ if have_rust
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if have_rust
|
||||||
|
rustfmt = find_program('rustfmt', required: false)
|
||||||
|
endif
|
||||||
|
|
||||||
dtrace = not_found
|
dtrace = not_found
|
||||||
stap = not_found
|
stap = not_found
|
||||||
if 'dtrace' in get_option('trace_backends')
|
if 'dtrace' in get_option('trace_backends')
|
||||||
|
@ -3995,6 +3999,13 @@ if have_rust
|
||||||
'--allowlist-file', meson.project_source_root() + '/.*',
|
'--allowlist-file', meson.project_source_root() + '/.*',
|
||||||
'--allowlist-file', meson.project_build_root() + '/.*'
|
'--allowlist-file', meson.project_build_root() + '/.*'
|
||||||
]
|
]
|
||||||
|
if not rustfmt.found()
|
||||||
|
if bindgen.version().version_compare('<0.65.0')
|
||||||
|
bindgen_args += ['--no-rustfmt-bindings']
|
||||||
|
else
|
||||||
|
bindgen_args += ['--formatter', 'none']
|
||||||
|
endif
|
||||||
|
endif
|
||||||
if bindgen.version().version_compare('<0.61.0')
|
if bindgen.version().version_compare('<0.61.0')
|
||||||
# default in 0.61+
|
# default in 0.61+
|
||||||
bindgen_args += ['--size_t-is-usize']
|
bindgen_args += ['--size_t-is-usize']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue