summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-02-04 17:53:44 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-07-18 09:42:56 -0700
commitff963e657cf1151cf002efc123563cb40dabab11 (patch)
tree99fde408ecc91fe6887a093e4a892f5a86cdd381 /test cases
parent08798850c1c2798e55fe7099cbff231e48d52e42 (diff)
downloadmeson-ff963e657cf1151cf002efc123563cb40dabab11.tar.gz
rust: add rust_dynamic_std option
As an initial implementation, simply adding "-C prefer-dynamic" works for binary crates (as well as dylib and proc-macro that already used it). In the future this could be extended to other crate types. For more information see the comment in the changed file, as well as https://github.com/mesonbuild/meson/issues/8828 and https://github.com/mesonbuild/meson/issues/14215. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'test cases')
-rw-r--r--test cases/rust/1 basic/meson.build6
-rw-r--r--test cases/rust/1 basic/test.json4
2 files changed, 9 insertions, 1 deletions
diff --git a/test cases/rust/1 basic/meson.build b/test cases/rust/1 basic/meson.build
index f422beb74..00bd21248 100644
--- a/test cases/rust/1 basic/meson.build
+++ b/test cases/rust/1 basic/meson.build
@@ -6,6 +6,12 @@ e = executable('rust-program', 'prog.rs',
)
test('rusttest', e)
+e = executable('rust-dynamic', 'prog.rs',
+ override_options: {'rust_dynamic_std': true},
+ install : true
+)
+test('rusttest-dynamic', e)
+
subdir('subdir')
# this should fail due to debug_assert
diff --git a/test cases/rust/1 basic/test.json b/test cases/rust/1 basic/test.json
index 95e6ced7e..3cbdefa78 100644
--- a/test cases/rust/1 basic/test.json
+++ b/test cases/rust/1 basic/test.json
@@ -3,6 +3,8 @@
{"type": "exe", "file": "usr/bin/rust-program"},
{"type": "pdb", "file": "usr/bin/rust-program"},
{"type": "exe", "file": "usr/bin/rust-program2"},
- {"type": "pdb", "file": "usr/bin/rust-program2"}
+ {"type": "pdb", "file": "usr/bin/rust-program2"},
+ {"type": "exe", "file": "usr/bin/rust-dynamic"},
+ {"type": "pdb", "file": "usr/bin/rust-dynamic"}
]
}