Skip to content

Commit

Permalink
[cmake] Prevent LLVMgold.so from being unloaded on Linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zmodem committed Aug 16, 2018
1 parent e32c31a commit 1cc890d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/cmake/modules/HandleLLVMOptions.cmake
Expand Up @@ -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()


Expand Down

0 comments on commit 1cc890d

Please sign in to comment.