On 4/29/26 01:16, Pierrick Bouvier wrote:
I noticed that plugins are not working when building with with
--enable-rust.
We explicitly export qemu_plugin_* symbols from QEMU binary using:
plugins/meson.build:24 [1]
```
emulator_link_args += '-Xlinker', '--dynamic-list=' +
qemu_plugin_symbols.full_path()
```
Tracing a rust enabled build, it seems that rustc is responsible for
doing the final link, by calling the compiler (cc here).
However, I didn't see those flags being passed.
Any idea how to make rustc apply these flags correctly?
I would start by testing Meson 1.11. From
https://mesonbuild.com/Release-notes-for-1-11-0.html:
---
## Change to handling of linker arguments for Rust
Since the Rust compiler integrates the compiler and linker phase,
previous Meson versions did not obey link_args,
add_project_link_arguments or add_global_link_arguments.
Starting in this version, add_project_link_arguments(),
add_global_link_arguments(), and the link_args keyword argument are
supported for Rust. They wrap the arguments with -Clink-arg= when
invoking rustc, and are only included when creating binary or shared
library crates.
Likewise, methods such as has_link_argument() now wrap the arguments
being tested with -Clink-arg=.
----
Paolo