summaryrefslogtreecommitdiffstats
path: root/tests/run-make/windows-safeseh/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/run-make/windows-safeseh/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/run-make/windows-safeseh/Makefile b/tests/run-make/windows-safeseh/Makefile
new file mode 100644
index 000000000..d6a403961
--- /dev/null
+++ b/tests/run-make/windows-safeseh/Makefile
@@ -0,0 +1,19 @@
+# only-windows
+# needs-rust-lld
+
+include ../tools.mk
+
+all: foo bar
+
+# Ensure that LLD can link when an .rlib contains a synthetic object
+# file referencing exported or used symbols.
+foo:
+ $(RUSTC) -C linker=rust-lld foo.rs
+
+# Ensure that LLD can link when /WHOLEARCHIVE: is used with an .rlib.
+# Previously, lib.rmeta was not marked as (trivially) SAFESEH-aware.
+bar: baz
+ $(RUSTC) -C linker=rust-lld -C link-arg=/WHOLEARCHIVE:libbaz.rlib bar.rs
+
+baz:
+ $(RUSTC) baz.rs