[gn] try porting 07af0e2d3e84 even more
authorNico Weber <thakis@chromium.org>
Sun, 18 Dec 2022 21:57:20 +0000 (16:57 -0500)
committerNico Weber <thakis@chromium.org>
Sun, 18 Dec 2022 21:58:04 +0000 (16:58 -0500)
Possibly fixes tests on Linux. This corresponds to
`export_executable_symbols_for_plugins` calls in CMake.

llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn

index a94695e..4c3fe2f 100644 (file)
@@ -85,4 +85,11 @@ unittest("AnalysisTests") {
   if (host_os != "win") {
     deps += [ ":InlineAdvisorPlugin" ]
   }
+
+  # Support plugins.
+  # FIXME: Disable dead stripping once other binaries are dead-stripped.
+  if (host_os != "mac" && host_os != "win") {
+    # Corresponds to export_executable_symbols() in cmake.
+    ldflags = [ "-rdynamic" ]
+  }
 }