summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/redundant-libs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make-fulldeps/redundant-libs')
-rw-r--r--tests/run-make-fulldeps/redundant-libs/Makefile23
-rw-r--r--tests/run-make-fulldeps/redundant-libs/bar.c1
-rw-r--r--tests/run-make-fulldeps/redundant-libs/baz.c7
-rw-r--r--tests/run-make-fulldeps/redundant-libs/foo.c2
-rw-r--r--tests/run-make-fulldeps/redundant-libs/main.rs11
5 files changed, 0 insertions, 44 deletions
diff --git a/tests/run-make-fulldeps/redundant-libs/Makefile b/tests/run-make-fulldeps/redundant-libs/Makefile
deleted file mode 100644
index b2dff05d1..000000000
--- a/tests/run-make-fulldeps/redundant-libs/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-include ../tools.mk
-
-# ignore-windows-msvc
-
-# rustc will remove one of the two redundant references to foo below. Depending
-# on which one gets removed, we'll get a linker error on SOME platforms (like
-# Linux). On these platforms, when a library is referenced, the linker will
-# only pull in the symbols needed _at that point in time_. If a later library
-# depends on additional symbols from the library, they will not have been pulled
-# in, and you'll get undefined symbols errors.
-#
-# So in this example, we need to ensure that rustc keeps the _later_ reference
-# to foo, and not the former one.
-RUSTC_FLAGS = \
- -l static=bar \
- -l foo \
- -l static=baz \
- -l foo \
- --print link-args
-
-all: $(call DYLIB,foo) $(call STATICLIB,bar) $(call STATICLIB,baz)
- $(RUSTC) $(RUSTC_FLAGS) main.rs
- $(call RUN,main)
diff --git a/tests/run-make-fulldeps/redundant-libs/bar.c b/tests/run-make-fulldeps/redundant-libs/bar.c
deleted file mode 100644
index e42599986..000000000
--- a/tests/run-make-fulldeps/redundant-libs/bar.c
+++ /dev/null
@@ -1 +0,0 @@
-void bar() {}
diff --git a/tests/run-make-fulldeps/redundant-libs/baz.c b/tests/run-make-fulldeps/redundant-libs/baz.c
deleted file mode 100644
index a4e2c2b71..000000000
--- a/tests/run-make-fulldeps/redundant-libs/baz.c
+++ /dev/null
@@ -1,7 +0,0 @@
-extern void foo1();
-extern void foo2();
-
-void baz() {
- foo1();
- foo2();
-}
diff --git a/tests/run-make-fulldeps/redundant-libs/foo.c b/tests/run-make-fulldeps/redundant-libs/foo.c
deleted file mode 100644
index 339ee86c9..000000000
--- a/tests/run-make-fulldeps/redundant-libs/foo.c
+++ /dev/null
@@ -1,2 +0,0 @@
-void foo1() {}
-void foo2() {}
diff --git a/tests/run-make-fulldeps/redundant-libs/main.rs b/tests/run-make-fulldeps/redundant-libs/main.rs
deleted file mode 100644
index 90d185ff5..000000000
--- a/tests/run-make-fulldeps/redundant-libs/main.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-extern "C" {
- fn bar();
- fn baz();
-}
-
-fn main() {
- unsafe {
- bar();
- baz();
- }
-}