From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org
Subject: [PATCH] rust: workaround compilation failures with Meson <1.10
Date: Fri, 28 Nov 2025 10:42:44 +0100 [thread overview]
Message-ID: <20251128094244.208571-1-pbonzini@redhat.com> (raw)
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 <pbonzini@redhat.com>
---
rust/util/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/rust/util/meson.build b/rust/util/meson.build
index 95aa211ef0b..2aa32a233eb 100644
--- a/rust/util/meson.build
+++ b/rust/util/meson.build
@@ -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],
--
2.51.1
reply other threads:[~2025-11-28 9:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251128094244.208571-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).