From b7d2b465b9a3d375ad3c1fbce75fa2ed47cc9e99 Mon Sep 17 00:00:00 2001 From: Christiaan Dirkx Date: Tue, 25 May 2021 00:05:18 +0200 Subject: [PATCH] Add test for checking if WS2_32.dll is linked --- src/test/run-make/issue-85441/Makefile | 9 +++++++++ src/test/run-make/issue-85441/empty.rs | 1 + 2 files changed, 10 insertions(+) create mode 100644 src/test/run-make/issue-85441/Makefile create mode 100644 src/test/run-make/issue-85441/empty.rs diff --git a/src/test/run-make/issue-85441/Makefile b/src/test/run-make/issue-85441/Makefile new file mode 100644 index 0000000000000..0de956d3aee52 --- /dev/null +++ b/src/test/run-make/issue-85441/Makefile @@ -0,0 +1,9 @@ +# only-windows + +-include ../../run-make-fulldeps/tools.mk + +# Tests that WS2_32.dll is not unnecessarily linked, see issue #85441 + +all: + $(RUSTC) empty.rs + objdump -p $(TMPDIR)/empty.exe | $(CGREP) -v -i "WS2_32.dll" diff --git a/src/test/run-make/issue-85441/empty.rs b/src/test/run-make/issue-85441/empty.rs new file mode 100644 index 0000000000000..f328e4d9d04c3 --- /dev/null +++ b/src/test/run-make/issue-85441/empty.rs @@ -0,0 +1 @@ +fn main() {}