From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- meson/test cases/rust/3 staticlib/meson.build | 5 +++++ meson/test cases/rust/3 staticlib/prog.rs | 3 +++ meson/test cases/rust/3 staticlib/stuff.rs | 3 +++ meson/test cases/rust/3 staticlib/test.json | 7 +++++++ 4 files changed, 18 insertions(+) create mode 100644 meson/test cases/rust/3 staticlib/meson.build create mode 100644 meson/test cases/rust/3 staticlib/prog.rs create mode 100644 meson/test cases/rust/3 staticlib/stuff.rs create mode 100644 meson/test cases/rust/3 staticlib/test.json (limited to 'meson/test cases/rust/3 staticlib') diff --git a/meson/test cases/rust/3 staticlib/meson.build b/meson/test cases/rust/3 staticlib/meson.build new file mode 100644 index 000000000..676956463 --- /dev/null +++ b/meson/test cases/rust/3 staticlib/meson.build @@ -0,0 +1,5 @@ +project('rust static library', 'rust') + +l = static_library('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/3 staticlib/prog.rs b/meson/test cases/rust/3 staticlib/prog.rs new file mode 100644 index 000000000..fbf318159 --- /dev/null +++ b/meson/test cases/rust/3 staticlib/prog.rs @@ -0,0 +1,3 @@ +extern crate stuff; + +fn main() { println!("printing: {}", stuff::explore()); } diff --git a/meson/test cases/rust/3 staticlib/stuff.rs b/meson/test cases/rust/3 staticlib/stuff.rs new file mode 100644 index 000000000..8cabc6257 --- /dev/null +++ b/meson/test cases/rust/3 staticlib/stuff.rs @@ -0,0 +1,3 @@ +#![crate_name = "stuff"] + +pub fn explore() -> &'static str { "librarystring" } diff --git a/meson/test cases/rust/3 staticlib/test.json b/meson/test cases/rust/3 staticlib/test.json new file mode 100644 index 000000000..ca292254e --- /dev/null +++ b/meson/test cases/rust/3 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/libstuff.rlib"} + ] +} -- cgit 1.2.3-korg