diff options
Diffstat (limited to '')
-rw-r--r-- | tests/run-make/windows-safeseh/Makefile | 19 | ||||
-rw-r--r-- | tests/run-make/windows-safeseh/bar.rs | 1 | ||||
-rw-r--r-- | tests/run-make/windows-safeseh/baz.rs | 4 | ||||
-rw-r--r-- | tests/run-make/windows-safeseh/foo.rs (renamed from tests/run-make/issue-96498/foo.rs) | 0 |
4 files changed, 24 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 diff --git a/tests/run-make/windows-safeseh/bar.rs b/tests/run-make/windows-safeseh/bar.rs new file mode 100644 index 000000000..f328e4d9d --- /dev/null +++ b/tests/run-make/windows-safeseh/bar.rs @@ -0,0 +1 @@ +fn main() {} diff --git a/tests/run-make/windows-safeseh/baz.rs b/tests/run-make/windows-safeseh/baz.rs new file mode 100644 index 000000000..8d5b9dc5a --- /dev/null +++ b/tests/run-make/windows-safeseh/baz.rs @@ -0,0 +1,4 @@ +#![crate_type = "rlib"] + +#[no_mangle] +extern "C" fn baz() {} diff --git a/tests/run-make/issue-96498/foo.rs b/tests/run-make/windows-safeseh/foo.rs index 93ac3641b..93ac3641b 100644 --- a/tests/run-make/issue-96498/foo.rs +++ b/tests/run-make/windows-safeseh/foo.rs |