[PATCH] D50416: [cmake] Prevent LLVMgold.so from being unloaded on Linux

Evangelos Foutras via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 7 15:54:52 PDT 2018


foutrelis created this revision.
foutrelis added reviewers: chapuni, tstellar, airlied, beanz, mgorny.
Herald added a subscriber: llvm-commits.

Extend the fix from https://reviews.llvm.org/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 PR23460 (https://sourceware.org/bugzilla/show_bug.cgi?id=23460).


Repository:
  rL LLVM

https://reviews.llvm.org/D50416

Files:
  cmake/modules/HandleLLVMOptions.cmake


Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -149,6 +149,7 @@
 # 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()
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50416.159610.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180807/787f5af1/attachment.bin>


More information about the llvm-commits mailing list