mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00

Once qemu-api is split in multiple crates, each of them will have its own invocation of bindgen. There cannot be only one, because there are occasional "impl" blocks for the bindgen-generated structs (e.g. VMStateFlags or QOM classes) that have to reside in the same crate as the bindgen-generated code. For now, prepare for this new organization by invoking bindgen within the qemu-api crate's build definitions; it's also a much better place to list enums that need specific treatment from bindgen. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
39 lines
1.1 KiB
Meson
39 lines
1.1 KiB
Meson
subproject('anyhow-1-rs', required: true)
|
|
subproject('bilge-0.2-rs', required: true)
|
|
subproject('bilge-impl-0.2-rs', required: true)
|
|
subproject('foreign-0.3-rs', required: true)
|
|
subproject('libc-0.2-rs', required: true)
|
|
|
|
anyhow_rs = dependency('anyhow-1-rs')
|
|
bilge_rs = dependency('bilge-0.2-rs')
|
|
bilge_impl_rs = dependency('bilge-impl-0.2-rs')
|
|
foreign_rs = dependency('foreign-0.3-rs')
|
|
libc_rs = dependency('libc-0.2-rs')
|
|
|
|
subproject('proc-macro2-1-rs', required: true)
|
|
subproject('quote-1-rs', required: true)
|
|
subproject('syn-2-rs', required: true)
|
|
|
|
quote_rs_native = dependency('quote-1-rs', native: true)
|
|
syn_rs_native = dependency('syn-2-rs', native: true)
|
|
proc_macro2_rs_native = dependency('proc-macro2-1-rs', native: true)
|
|
|
|
qemuutil_rs = qemuutil.partial_dependency(link_args: true, links: true)
|
|
|
|
genrs = []
|
|
|
|
subdir('qemu-api-macros')
|
|
subdir('bits')
|
|
subdir('qemu-api')
|
|
|
|
subdir('hw')
|
|
|
|
cargo = find_program('cargo', required: false)
|
|
|
|
if cargo.found()
|
|
run_target('rustfmt',
|
|
command: [config_host['MESON'], 'devenv',
|
|
'--workdir', '@CURRENT_SOURCE_DIR@',
|
|
cargo, 'fmt'],
|
|
depends: genrs)
|
|
endif
|