Revert r319069 - [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading
authorMichal Gorny <mgorny@gentoo.org>
Mon, 27 Nov 2017 19:18:36 +0000 (19:18 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Mon, 27 Nov 2017 19:18:36 +0000 (19:18 +0000)
This breaks one of the unit tests. Need to find a good solution.

llvm-svn: 319076

llvm/cmake/modules/HandleLLVMOptions.cmake

index b5059a8..c539037 100644 (file)
@@ -151,14 +151,6 @@ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
   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})