test: ensure that we dead-strip in the linker
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 24 Dec 2019 18:18:13 +0000 (10:18 -0800)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 24 Dec 2019 18:19:22 +0000 (10:19 -0800)
`/OPT:REF` is needed for link to dead strip functions, `/Gy` by itself
is not sufficient.

lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile

index fa147bb..ea15ec8 100644 (file)
@@ -8,6 +8,7 @@ ifeq "$(OS)" "Darwin"
     LD_EXTRAS = -Xlinker -dead_strip
 else ifeq "$(OS)" "Windows_NT"
     CFLAGS_EXTRAS += /Gw /Gy
+    LD_EXTRAS = -Xlinker /OPT:REF
 else
     CFLAGS_EXTRAS += -fdata-sections -ffunction-sections
     LD_EXTRAS = -Wl,--gc-sections