summaryrefslogtreecommitdiffstats
path: root/tests/run-make/lto-no-link-whole-rlib/lib2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/lto-no-link-whole-rlib/lib2.rs')
-rw-r--r--tests/run-make/lto-no-link-whole-rlib/lib2.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run-make/lto-no-link-whole-rlib/lib2.rs b/tests/run-make/lto-no-link-whole-rlib/lib2.rs
new file mode 100644
index 000000000..2dec2a271
--- /dev/null
+++ b/tests/run-make/lto-no-link-whole-rlib/lib2.rs
@@ -0,0 +1,12 @@
+#![crate_type = "rlib"]
+
+extern crate lib1;
+
+#[link(name = "bar", kind = "static")]
+extern "C" {
+ fn foo() -> i32;
+}
+
+pub fn foo2() -> i32 {
+ unsafe { foo() }
+}