diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-19 23:38:31 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-04-02 08:44:37 -0700 |
| commit | 0c8f6400e3f731a5c5091653c0940f6318bdce23 (patch) | |
| tree | 65f32846112e452d5fbadfa1c9f4608884ca7b75 /docs/markdown/snippets | |
| parent | bf8d4927238a40dc0dca584e91988f456a970bbb (diff) | |
| download | meson-0c8f6400e3f731a5c5091653c0940f6318bdce23.tar.gz | |
rust: add link_whole to rust.test and rust.doctest
QEMU needs it in its integration tests (in order to run global constructors),
and therefore in rust.doctest too. With this change I could do:
# Rust executables do not support objects, so add an intermediate step.
rust_qemu_api_objs = static_library(
'rust_qemu_api_objs',
objects: [libqom.extract_all_objects(recursive: false),
libhwcore.extract_all_objects(recursive: false)])
rust.doctest('rust-qemu-api-doc', _qemu_api_rs,
dependencies: [qemu_api, qemu_api_macros],
link_with: libqemuutil,
link_whole: [rust_qemu_api_objs],
suite: ['doc', 'rust'])
followed by "meson test --suite doc".
For completeness, add it to rust.test as well.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/markdown/snippets')
| -rw-r--r-- | docs/markdown/snippets/rust-test-link-whole.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/markdown/snippets/rust-test-link-whole.md b/docs/markdown/snippets/rust-test-link-whole.md new file mode 100644 index 000000000..f3d006d53 --- /dev/null +++ b/docs/markdown/snippets/rust-test-link-whole.md @@ -0,0 +1,4 @@ +## `rust.test` now supports `link_whole` + +The `test` function in the `rust` module now supports the `link_whole` +keyword argument in addition to `link_with` and `dependencies`. |
