summaryrefslogtreecommitdiffstats
path: root/tests/run-make/staticlib-dylib-linkage/foo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/staticlib-dylib-linkage/foo.rs')
-rw-r--r--tests/run-make/staticlib-dylib-linkage/foo.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/run-make/staticlib-dylib-linkage/foo.rs b/tests/run-make/staticlib-dylib-linkage/foo.rs
new file mode 100644
index 000000000..af439391c
--- /dev/null
+++ b/tests/run-make/staticlib-dylib-linkage/foo.rs
@@ -0,0 +1,13 @@
+#![crate_type = "staticlib"]
+
+extern crate bar;
+
+#[no_mangle]
+pub extern "C" fn foo() {
+ bar::bar();
+}
+
+#[no_mangle]
+pub extern "C" fn bar(a: u32, b: u32) -> u32 {
+ a + b
+}