summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-08-16 15:12:12 +0000
committerHans Wennborg <hans@hanshq.net>2018-08-16 15:12:12 +0000
commit1cc890d14befbd20a2636db282a31d3c099dc9af (patch)
tree18ec1b8b7e1b5d42002ad3b55e031c4dab96e6ba
parente32c31af312928a787a4c3882aac6dfa10c12c5a (diff)
downloadbcm5719-llvm-1cc890d14befbd20a2636db282a31d3c099dc9af.tar.gz
bcm5719-llvm-1cc890d14befbd20a2636db282a31d3c099dc9af.zip
[cmake] Prevent LLVMgold.so from being unloaded on Linux
Extend the fix from D40459 to also apply to modules such as the LLVM gold plugin. This is needed because current binutils master (and future binutils 2.32) calls dlclose() on bfd plugins as part of a recent fix for https://sourceware.org/bugzilla/show_bug.cgi?id=23460. Patch by Evangelos Foutras! Differential Revision: https://reviews.llvm.org/D50416 llvm-svn: 339883
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 5fd318f0091..05cf9026953 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -149,6 +149,7 @@ endif()
# is unloaded.
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,nodelete")
endif()
OpenPOWER on IntegriCloud