[llvm] a7cddd4 - [gn] build lldb-server with dead code stripping too
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 04:05:05 PDT 2024
Author: Nico Weber
Date: 2024-06-28T13:04:55+02:00
New Revision: a7cddd4818ff148eb8b1c4d94cccbbb213f9a0f4
URL: https://github.com/llvm/llvm-project/commit/a7cddd4818ff148eb8b1c4d94cccbbb213f9a0f4
DIFF: https://github.com/llvm/llvm-project/commit/a7cddd4818ff148eb8b1c4d94cccbbb213f9a0f4.diff
LOG: [gn] build lldb-server with dead code stripping too
Needed as a workaround for
https://github.com/llvm/llvm-project/pull/96985#pullrequestreview-2147599208
Hopefully this will be resolved soon and we can remove this again.
Added:
Modified:
llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn b/llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn
index bb1f3ad20b9d3..14458fe05f371 100644
--- a/llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn
@@ -73,4 +73,12 @@ executable("lldb-server") {
if (current_os == "android") {
output_dir = "$root_build_dir/runtimes_ndk_cxx/$crt_current_target_arch"
}
+
+ if (current_os == "mac") {
+ ldflags = [ "-Wl,-dead_strip" ]
+ } else if (current_os == "win") {
+ ldflags = [ "/OPT:REF" ]
+ } else {
+ ldflags = [ "-Wl,--gc-sections" ]
+ }
}
More information about the llvm-commits
mailing list