diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index bf2a482df35..b5517d0b893 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -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()