rust: workaround compilation failures with Meson <1.10
Subsystems (2)
PATCH 1/1 rust: workaround compilation failures with Meson <1.10
Prior to Meson 1.10, if the config-host.h dependency of qemuutil ends up as the first source file, it can be passed to rustc---which gets rather confused because config-host.h looks nothing like Rust code.
While this can usually be avoided in the individual targets, a simple and universal workaround is to remove the sources (and C compile arguments, while at it) from the "util_rs" dependency. This hides config-host.h from the Rust targets---and they don't need it anyway.
Signed-off-by Paolo Bonzini <[email protected]>
--- rust/util/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
rust/util/meson.build +3 -1
@@ -41,7 +41,9 @@ _util_rs = static_library( dependencies: [anyhow_rs, libc_rs, foreign_rs, glib_sys_rs, common_rs], ) -util_rs = declare_dependency(link_with: [_util_rs], dependencies: [qemuutil, qom]) +util_rs = declare_dependency(link_with: [_util_rs], dependencies: [ + qemuutil.partial_dependency(links: true, link_args: true), + qom]) rust.test('rust-util-tests', _util_rs, dependencies: [qemuutil, qom],
Signature · 1 line
2.51.1