diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/rust/6 named staticlib/meson.build | 5 | ||||
-rw-r--r-- | test cases/rust/6 named staticlib/prog.rs | 3 | ||||
-rw-r--r-- | test cases/rust/6 named staticlib/stuff.rs | 1 | ||||
-rw-r--r-- | test cases/rust/6 named staticlib/test.json | 7 |
4 files changed, 16 insertions, 0 deletions
diff --git a/test cases/rust/6 named staticlib/meson.build b/test cases/rust/6 named staticlib/meson.build new file mode 100644 index 0000000..f91b7a1 --- /dev/null +++ b/test cases/rust/6 named staticlib/meson.build @@ -0,0 +1,5 @@ +project('rust static library', 'rust') + +l = static_library('named_stuff', 'stuff.rs', install : true) +e = executable('prog', 'prog.rs', link_with : l, install : true) +test('linktest', e) diff --git a/test cases/rust/6 named staticlib/prog.rs b/test cases/rust/6 named staticlib/prog.rs new file mode 100644 index 0000000..856c4b7 --- /dev/null +++ b/test cases/rust/6 named staticlib/prog.rs @@ -0,0 +1,3 @@ +extern crate named_stuff; + +fn main() { println!("printing: {}", named_stuff::explore()); } diff --git a/test cases/rust/6 named staticlib/stuff.rs b/test cases/rust/6 named staticlib/stuff.rs new file mode 100644 index 0000000..9b36e57 --- /dev/null +++ b/test cases/rust/6 named staticlib/stuff.rs @@ -0,0 +1 @@ +pub fn explore() -> &'static str { "librarystring" } diff --git a/test cases/rust/6 named staticlib/test.json b/test cases/rust/6 named staticlib/test.json new file mode 100644 index 0000000..3ac3e0b --- /dev/null +++ b/test cases/rust/6 named staticlib/test.json @@ -0,0 +1,7 @@ +{ + "installed": [ + {"type": "exe", "file": "usr/bin/prog"}, + {"type": "pdb", "file": "usr/bin/prog"}, + {"type": "file", "file": "usr/lib/libnamed_stuff.rlib"} + ] +} |