diff options
Diffstat (limited to 'meson/test cases/rust/6 named staticlib')
4 files changed, 16 insertions, 0 deletions
diff --git a/meson/test cases/rust/6 named staticlib/meson.build b/meson/test cases/rust/6 named staticlib/meson.build new file mode 100644 index 000000000..f91b7a10a --- /dev/null +++ b/meson/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/meson/test cases/rust/6 named staticlib/prog.rs b/meson/test cases/rust/6 named staticlib/prog.rs new file mode 100644 index 000000000..856c4b7d1 --- /dev/null +++ b/meson/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/meson/test cases/rust/6 named staticlib/stuff.rs b/meson/test cases/rust/6 named staticlib/stuff.rs new file mode 100644 index 000000000..9b36e57a1 --- /dev/null +++ b/meson/test cases/rust/6 named staticlib/stuff.rs @@ -0,0 +1 @@ +pub fn explore() -> &'static str { "librarystring" } diff --git a/meson/test cases/rust/6 named staticlib/test.json b/meson/test cases/rust/6 named staticlib/test.json new file mode 100644 index 000000000..3ac3e0b9c --- /dev/null +++ b/meson/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"} + ] +} |