Skip to content

Commit 27fd98b

Browse files
nicolravenclaw
authored andcommitted
[gn] build lldb-test with dead code stripping
Needed as a workaround for llvm#96985 (review) Hopefully this will be resolved soon and we can remove this again.
1 parent d3bc6d3 commit 27fd98b

File tree

1 file changed

+8
-0
lines changed
  • llvm/utils/gn/secondary/lldb/tools/lldb-test

1 file changed

+8
-0
lines changed

llvm/utils/gn/secondary/lldb/tools/lldb-test/BUILD.gn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@ executable("lldb-test") {
2626
"SystemInitializerTest.cpp",
2727
"lldb-test.cpp",
2828
]
29+
30+
if (current_os == "mac") {
31+
ldflags = [ "-Wl,-dead_strip" ]
32+
} else if (current_os == "win") {
33+
ldflags = [ "/OPT:REF" ]
34+
} else {
35+
ldflags = [ "-Wl,--gc-sections" ]
36+
}
2937
}

0 commit comments

Comments
 (0)