[PATCH] D47469: [Unittests] Change linker flags of dynamic library tests

Mikhail Maltsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 11 02:20:04 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL334394: [Unittests] Change linker flags of dynamic library tests (authored by miyuki, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47469?vs=148878&id=150693#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47469

Files:
  llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt


Index: llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt
===================================================================
--- llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt
+++ llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -15,7 +15,7 @@
 export_executable_symbols(DynamicLibraryTests)
 
 function(dynlib_add_module NAME)
-  add_library(${NAME} MODULE
+  add_library(${NAME} SHARED
     PipSqueak.cpp
     )
   set_target_properties(${NAME} PROPERTIES FOLDER "Tests")
@@ -33,5 +33,12 @@
   add_dependencies(DynamicLibraryTests ${NAME})
 endfunction(dynlib_add_module)
 
+# Revert -Wl,-z,nodelete on this test since it relies on the file
+# being unloaded.
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+  string(REPLACE "-Wl,-z,nodelete" "" CMAKE_SHARED_LINKER_FLAGS
+    ${CMAKE_SHARED_LINKER_FLAGS})
+endif()
+
 dynlib_add_module(PipSqueak)
 dynlib_add_module(SecondLib)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47469.150693.patch
Type: text/x-patch
Size: 909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/da8756c5/attachment.bin>


More information about the llvm-commits mailing list