[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

Brad Smith via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 23 22:10:14 PDT 2023


================
@@ -10,8 +10,10 @@ link_flags = []
 if @LIBUNWIND_ENABLE_CET@:
     compile_flags.append('-fcf-protection=full')
 
-if '@CMAKE_SYSTEM_NAME@' == 'Linux':
-    link_flags.append('-Wl,--export-dynamic')
+# Add -Wl,--export-dynamic if supported by the linker (this CMake variable will
+# be empty for Apple platforms).
----------------
brad0 wrote:

I don't really like the idea of the comment in the round brackets. I think it would be better to just say something like.. ```On ELF platforms, add -Wl,--export-dynamic if supported by the linker.```

https://github.com/llvm/llvm-project/pull/67205


More information about the cfe-commits mailing list