diff options
Diffstat (limited to 'src/test/run-make-fulldeps/link-dedup')
-rw-r--r-- | src/test/run-make-fulldeps/link-dedup/Makefile | 12 | ||||
-rw-r--r-- | src/test/run-make-fulldeps/link-dedup/depa.rs | 7 | ||||
-rw-r--r-- | src/test/run-make-fulldeps/link-dedup/depb.rs | 8 | ||||
-rw-r--r-- | src/test/run-make-fulldeps/link-dedup/depc.rs | 4 | ||||
-rw-r--r-- | src/test/run-make-fulldeps/link-dedup/empty.rs | 5 |
5 files changed, 36 insertions, 0 deletions
diff --git a/src/test/run-make-fulldeps/link-dedup/Makefile b/src/test/run-make-fulldeps/link-dedup/Makefile new file mode 100644 index 000000000..4e7ce0f02 --- /dev/null +++ b/src/test/run-make-fulldeps/link-dedup/Makefile @@ -0,0 +1,12 @@ +# ignore-msvc + +-include ../tools.mk + +all: + $(RUSTC) depa.rs + $(RUSTC) depb.rs + $(RUSTC) depc.rs + $(RUSTC) empty.rs --cfg bar 2>&1 | $(CGREP) '"-ltesta" "-ltestb" "-ltesta"' + $(RUSTC) empty.rs 2>&1 | $(CGREP) '"-ltesta"' + $(RUSTC) empty.rs 2>&1 | $(CGREP) -v '"-ltestb"' + $(RUSTC) empty.rs 2>&1 | $(CGREP) -v '"-ltesta" "-ltesta"' diff --git a/src/test/run-make-fulldeps/link-dedup/depa.rs b/src/test/run-make-fulldeps/link-dedup/depa.rs new file mode 100644 index 000000000..e48ffd641 --- /dev/null +++ b/src/test/run-make-fulldeps/link-dedup/depa.rs @@ -0,0 +1,7 @@ +#![crate_type = "rlib"] + +#[link(name = "testa")] +extern "C" {} + +#[link(name = "testa")] +extern "C" {} diff --git a/src/test/run-make-fulldeps/link-dedup/depb.rs b/src/test/run-make-fulldeps/link-dedup/depb.rs new file mode 100644 index 000000000..b1be21fe0 --- /dev/null +++ b/src/test/run-make-fulldeps/link-dedup/depb.rs @@ -0,0 +1,8 @@ +#![feature(link_cfg)] +#![crate_type = "rlib"] + +#[link(name = "testb", cfg(foo))] +extern "C" {} + +#[link(name = "testb", cfg(bar))] +extern "C" {} diff --git a/src/test/run-make-fulldeps/link-dedup/depc.rs b/src/test/run-make-fulldeps/link-dedup/depc.rs new file mode 100644 index 000000000..8dcb3dee5 --- /dev/null +++ b/src/test/run-make-fulldeps/link-dedup/depc.rs @@ -0,0 +1,4 @@ +#![crate_type = "rlib"] + +#[link(name = "testa")] +extern "C" {} diff --git a/src/test/run-make-fulldeps/link-dedup/empty.rs b/src/test/run-make-fulldeps/link-dedup/empty.rs new file mode 100644 index 000000000..e00ae18f4 --- /dev/null +++ b/src/test/run-make-fulldeps/link-dedup/empty.rs @@ -0,0 +1,5 @@ +extern crate depa; +extern crate depb; +extern crate depc; + +fn main() {} |