about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2024-04-10 16:32:45 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2024-04-12 09:46:38 +0000
commitdee834b8a652ea867dca20192400f7331b830a7e (patch)
treeeba886b501c2f1706db0974bc91f76d979ca72b0
parent317d0bdd63d9a2ac174451ee0be76398a1bf704a (diff)
downloadrust-dee834b8a652ea867dca20192400f7331b830a7e.tar.gz
rust-dee834b8a652ea867dca20192400f7331b830a7e.zip
test duplicate features, that the last `+/-lld` on the CLI wins
-rw-r--r--tests/run-make/rust-lld/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run-make/rust-lld/Makefile b/tests/run-make/rust-lld/Makefile
index 50752391e28..1ecac479f41 100644
--- a/tests/run-make/rust-lld/Makefile
+++ b/tests/run-make/rust-lld/Makefile
@@ -6,3 +6,7 @@ include ../tools.mk
 all:
 	RUSTC_LOG=rustc_codegen_ssa::back::link=info $(RUSTC) -Clink-self-contained=+linker -Zlinker-features=+lld -Zunstable-options -Clink-args=-Wl,-v main.rs 2> $(TMPDIR)/output.txt
 	$(CGREP) -e "^LLD [0-9]+\.[0-9]+\.[0-9]+" < $(TMPDIR)/output.txt
+
+	# while we're here, also check that the last linker feature flag "wins"
+	RUSTC_LOG=rustc_codegen_ssa::back::link=info $(RUSTC) -Clink-self-contained=+linker -Zlinker-features=-lld -Zlinker-features=+lld -Zunstable-options -Clink-args=-Wl,-v main.rs 2> $(TMPDIR)/output.txt
+	$(CGREP) -e "^LLD [0-9]+\.[0-9]+\.[0-9]+" < $(TMPDIR)/output.txt