Skip to content

Commit a7cddd4

Browse files
committed
[gn] build lldb-server with dead code stripping too
Needed as a workaround for #96985 (review) Hopefully this will be resolved soon and we can remove this again.
1 parent c78b6fd commit a7cddd4

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,12 @@ executable("lldb-server") {
7373
if (current_os == "android") {
7474
output_dir = "$root_build_dir/runtimes_ndk_cxx/$crt_current_target_arch"
7575
}
76+
77+
if (current_os == "mac") {
78+
ldflags = [ "-Wl,-dead_strip" ]
79+
} else if (current_os == "win") {
80+
ldflags = [ "/OPT:REF" ]
81+
} else {
82+
ldflags = [ "-Wl,--gc-sections" ]
83+
}
7684
}

0 commit comments

Comments
 (0)