Skip to content

Commit 0ce7d17

Browse files
committed
Ensure dynamic dispatch works
1 parent 6bfd4d3 commit 0ce7d17

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/build_test.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ fn test_cpu_attr() {
2828
})]).unwrap();
2929
}
3030

31+
#[test]
32+
fn allow_dynamic_dispatch() {
33+
use std::path::*;
34+
let pb = PathBuf::from("libtest.a");
35+
let t1 = Path::new("tests/test.ll");
36+
build_archive(&pb as &AsRef<Path>,
37+
&[(&t1 as &AsRef<Path>, BuildOptions {
38+
triple: String::from("x86_64-unknown-linux-gnu"),
39+
..BuildOptions::default()
40+
}), (&"tests/test.ll" as &AsRef<Path>, BuildOptions {
41+
triple: String::from("i386-unknown-linux-gnu"),
42+
..BuildOptions::default()
43+
})]).unwrap();
44+
}
45+
3146
#[test]
3247
fn test_optimisation() {
3348
build_archive("librandopt.a", &[("tests/rdrand.ll", BuildOptions {

0 commit comments

Comments
 (0)