[llvm] r253944 - [CMake] export_executable_symbols also needs to add -rdynamic to the linker flags on Darwin

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 16:58:58 PST 2015


Author: cbieneman
Date: Mon Nov 23 18:58:58 2015
New Revision: 253944

URL: http://llvm.org/viewvc/llvm-project?rev=253944&view=rev
Log:
[CMake] export_executable_symbols also needs to add -rdynamic to the linker flags on Darwin

Without -rdynamic LLVM built with LTO fails to pass "check" due to loadable modules failing.

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=253944&r1=253943&r2=253944&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Nov 23 18:58:58 2015
@@ -660,6 +660,10 @@ endmacro(add_llvm_executable name)
 function(export_executable_symbols target)
   if (NOT MSVC) # MSVC's linker doesn't support exporting all symbols.
     set_target_properties(${target} PROPERTIES ENABLE_EXPORTS 1)
+    if (APPLE)
+      set_target_properties(${target} PROPERTIES
+        LINK_FLAGS "-rdynamic")
+    endif()
   endif()
 endfunction()
 




More information about the llvm-commits mailing list