summaryrefslogtreecommitdiffstats
path: root/src/test/run-make/raw-dylib-c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-make/raw-dylib-c')
-rw-r--r--src/test/run-make/raw-dylib-c/Makefile28
-rw-r--r--src/test/run-make/raw-dylib-c/driver.rs5
-rw-r--r--src/test/run-make/raw-dylib-c/extern_1.c28
-rw-r--r--src/test/run-make/raw-dylib-c/extern_2.c6
-rw-r--r--src/test/run-make/raw-dylib-c/lib.rs37
-rw-r--r--src/test/run-make/raw-dylib-c/output.txt6
6 files changed, 0 insertions, 110 deletions
diff --git a/src/test/run-make/raw-dylib-c/Makefile b/src/test/run-make/raw-dylib-c/Makefile
deleted file mode 100644
index f47ab24f4..000000000
--- a/src/test/run-make/raw-dylib-c/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# Test the behavior of #[link(.., kind = "raw-dylib")] on windows-msvc
-
-# only-windows
-
-include ../../run-make-fulldeps/tools.mk
-
-all:
- $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
- $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
- $(RUSTC) --crate-type bin --crate-name raw_dylib_test_bin lib.rs
- $(call COMPILE_OBJ,"$(TMPDIR)"/extern_1.obj,extern_1.c)
- $(call COMPILE_OBJ,"$(TMPDIR)"/extern_2.obj,extern_2.c)
-ifdef IS_MSVC
- $(CC) "$(TMPDIR)"/extern_1.obj -link -dll -out:"$(TMPDIR)"/extern_1.dll -noimplib
- $(CC) "$(TMPDIR)"/extern_2.obj -link -dll -out:"$(TMPDIR)"/extern_2.dll -noimplib
-else
- $(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
- $(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
-endif
- "$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
- "$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt
-
-ifdef RUSTC_BLESS_TEST
- cp "$(TMPDIR)"/output.txt output.txt
-else
- $(DIFF) output.txt "$(TMPDIR)"/output.txt
- $(DIFF) output.txt "$(TMPDIR)"/output_bin.txt
-endif
diff --git a/src/test/run-make/raw-dylib-c/driver.rs b/src/test/run-make/raw-dylib-c/driver.rs
deleted file mode 100644
index 4059ede11..000000000
--- a/src/test/run-make/raw-dylib-c/driver.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-extern crate raw_dylib_test;
-
-fn main() {
- raw_dylib_test::library_function();
-}
diff --git a/src/test/run-make/raw-dylib-c/extern_1.c b/src/test/run-make/raw-dylib-c/extern_1.c
deleted file mode 100644
index 5d695547d..000000000
--- a/src/test/run-make/raw-dylib-c/extern_1.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <stdio.h>
-
-__declspec(dllexport) int extern_variable = 0;
-
-__declspec(dllexport) void extern_fn_1() {
- printf("extern_fn_1\n");
- fflush(stdout);
-}
-
-__declspec(dllexport) void extern_fn_2() {
- printf("extern_fn_2; didn't get the rename\n");
- fflush(stdout);
-}
-
-__declspec(dllexport) void print_extern_variable() {
- printf("extern_variable value: %d\n", extern_variable);
- fflush(stdout);
-}
-
-__declspec(dllexport) void extern_fn_with_long_name() {
- printf("extern_fn_with_long_name; got the rename\n");
- fflush(stdout);
-}
-
-__declspec(dllexport) void extern_fn_4() {
- printf("extern_fn_4\n");
- fflush(stdout);
-}
diff --git a/src/test/run-make/raw-dylib-c/extern_2.c b/src/test/run-make/raw-dylib-c/extern_2.c
deleted file mode 100644
index ae87fc3f8..000000000
--- a/src/test/run-make/raw-dylib-c/extern_2.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-__declspec(dllexport) void extern_fn_3() {
- printf("extern_fn_3\n");
- fflush(stdout);
-}
diff --git a/src/test/run-make/raw-dylib-c/lib.rs b/src/test/run-make/raw-dylib-c/lib.rs
deleted file mode 100644
index 5fb120403..000000000
--- a/src/test/run-make/raw-dylib-c/lib.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-#![feature(raw_dylib)]
-
-#[link(name = "extern_1.dll", kind = "raw-dylib", modifiers = "+verbatim")]
-extern {
- fn extern_fn_1();
-}
-
-#[link(name = "extern_2", kind = "raw-dylib")]
-extern {
- fn extern_fn_3();
-}
-
-pub fn library_function() {
- #[link(name = "extern_1", kind = "raw-dylib")]
- extern {
- fn extern_fn_2();
- fn print_extern_variable();
- static mut extern_variable: i32;
- #[link_name = "extern_fn_4"]
- fn extern_fn_4_renamed();
- }
-
- unsafe {
- extern_fn_1();
- extern_fn_2();
- extern_fn_3();
- extern_fn_4_renamed();
- extern_variable = 42;
- print_extern_variable();
- extern_variable = -42;
- print_extern_variable();
- }
-}
-
-fn main() {
- library_function();
-}
diff --git a/src/test/run-make/raw-dylib-c/output.txt b/src/test/run-make/raw-dylib-c/output.txt
deleted file mode 100644
index cc970cef7..000000000
--- a/src/test/run-make/raw-dylib-c/output.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-extern_fn_1
-extern_fn_2; didn't get the rename
-extern_fn_3
-extern_fn_4
-extern_variable value: 42
-extern_variable value: -42