[PATCH 32/33] rust: meson: remove unnecessary complication in device crates

Paolo Bonzini posted 33 patches 2 weeks, 6 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
[PATCH 32/33] rust: meson: remove unnecessary complication in device crates
Posted by Paolo Bonzini 2 weeks, 6 days ago
It is not necessary anymore to explicitly list procedural macro crates
when doing the final link using rustc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rust/hw/char/pl011/meson.build | 3 ---
 rust/hw/timer/hpet/meson.build | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/rust/hw/char/pl011/meson.build b/rust/hw/char/pl011/meson.build
index 628a5238702..ffdc8af53f1 100644
--- a/rust/hw/char/pl011/meson.build
+++ b/rust/hw/char/pl011/meson.build
@@ -44,8 +44,5 @@ _libpl011_rs = static_library(
 
 rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency(
   link_whole: [_libpl011_rs],
-  # Putting proc macro crates in `dependencies` is necessary for Meson to find
-  # them when compiling the root per-target static rust lib.
-  dependencies: [bilge_impl_rs, qemu_macros],
   variables: {'crate': 'pl011'},
 )])
diff --git a/rust/hw/timer/hpet/meson.build b/rust/hw/timer/hpet/meson.build
index b6bb9477f0c..bb64b96672e 100644
--- a/rust/hw/timer/hpet/meson.build
+++ b/rust/hw/timer/hpet/meson.build
@@ -16,8 +16,5 @@ _libhpet_rs = static_library(
 
 rust_devices_ss.add(when: 'CONFIG_X_HPET_RUST', if_true: [declare_dependency(
   link_whole: [_libhpet_rs],
-  # Putting proc macro crates in `dependencies` is necessary for Meson to find
-  # them when compiling the root per-target static rust lib.
-  dependencies: [qemu_macros],
   variables: {'crate': 'hpet'},
 )])
-- 
2.51.0
Re: [PATCH 32/33] rust: meson: remove unnecessary complication in device crates
Posted by Zhao Liu 2 weeks, 2 days ago
On Mon, Sep 08, 2025 at 12:50:04PM +0200, Paolo Bonzini wrote:
> Date: Mon,  8 Sep 2025 12:50:04 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 32/33] rust: meson: remove unnecessary complication in
>  device crates
> X-Mailer: git-send-email 2.51.0
> 
> It is not necessary anymore to explicitly list procedural macro crates
> when doing the final link using rustc.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/hw/char/pl011/meson.build | 3 ---
>  rust/hw/timer/hpet/meson.build | 3 ---
>  2 files changed, 6 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>