[llvm] r319076 - Revert r319069 - [cmake] Pass -Wl, -z, nodelete on Linux to prevent unloading

Michal Gorny via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 11:18:37 PST 2017


Author: mgorny
Date: Mon Nov 27 11:18:36 2017
New Revision: 319076

URL: http://llvm.org/viewvc/llvm-project?rev=319076&view=rev
Log:
Revert r319069 - [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading

This breaks one of the unit tests. Need to find a good solution.

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=319076&r1=319075&r2=319076&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Mon Nov 27 11:18:36 2017
@@ -151,14 +151,6 @@ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Da
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
 endif()
 
-# Pass -Wl,-z,nodelete. This makes sure our shared libraries are not unloaded
-# by dlclose(). We need that since the CLI API relies on cross-references
-# between global objects which became horribly broken when one of the libraries
-# is unloaded.
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete")
-endif()
-
 
 function(append value)
   foreach(variable ${ARGN})




More information about the llvm-commits mailing list