diff options
| author | Joshua Nelson <github@jyn.dev> | 2023-03-30 07:34:55 -0500 |
|---|---|---|
| committer | Joshua Nelson <github@jyn.dev> | 2023-03-30 07:34:55 -0500 |
| commit | 433da1fc047bb39a263eefca4bdb2b1972f1d2ce (patch) | |
| tree | 28540e78fdd5fdf158267e67495121ac64f0866a /tests/run-make/link-dedup | |
| parent | f2d9a3d0771504f1ae776226a5799dcb4408a91a (diff) | |
| download | rust-433da1fc047bb39a263eefca4bdb2b1972f1d2ce.tar.gz rust-433da1fc047bb39a263eefca4bdb2b1972f1d2ce.zip | |
Move almost all run-make-fulldeps to run-make
They pass fine.
Diffstat (limited to 'tests/run-make/link-dedup')
| -rw-r--r-- | tests/run-make/link-dedup/Makefile | 12 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/depa.rs | 10 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/depb.rs | 8 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/depc.rs | 4 | ||||
| -rw-r--r-- | tests/run-make/link-dedup/empty.rs | 5 |
5 files changed, 39 insertions, 0 deletions
diff --git a/tests/run-make/link-dedup/Makefile b/tests/run-make/link-dedup/Makefile new file mode 100644 index 00000000000..eff18ab48ab --- /dev/null +++ b/tests/run-make/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" "-ltesta"' diff --git a/tests/run-make/link-dedup/depa.rs b/tests/run-make/link-dedup/depa.rs new file mode 100644 index 00000000000..19178c5bd49 --- /dev/null +++ b/tests/run-make/link-dedup/depa.rs @@ -0,0 +1,10 @@ +#![crate_type = "rlib"] + +#[link(name = "testa")] +extern "C" {} + +#[link(name = "testa")] +extern "C" {} + +#[link(name = "testa")] +extern "C" {} diff --git a/tests/run-make/link-dedup/depb.rs b/tests/run-make/link-dedup/depb.rs new file mode 100644 index 00000000000..b1be21fe005 --- /dev/null +++ b/tests/run-make/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/tests/run-make/link-dedup/depc.rs b/tests/run-make/link-dedup/depc.rs new file mode 100644 index 00000000000..8dcb3dee5a2 --- /dev/null +++ b/tests/run-make/link-dedup/depc.rs @@ -0,0 +1,4 @@ +#![crate_type = "rlib"] + +#[link(name = "testa")] +extern "C" {} diff --git a/tests/run-make/link-dedup/empty.rs b/tests/run-make/link-dedup/empty.rs new file mode 100644 index 00000000000..e00ae18f4af --- /dev/null +++ b/tests/run-make/link-dedup/empty.rs @@ -0,0 +1,5 @@ +extern crate depa; +extern crate depb; +extern crate depc; + +fn main() {} |
