[CMake] export_executable_symbols also needs to add -rdynamic to the linker flags...
[oota-llvm.git] / cmake / modules / AddLLVM.cmake
index bf2a482df35ea1679a3fab87c0967be371902447..b5517d0b893d145c92c1e4c16f22e95a47a87bb8 100644 (file)
@@ -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()