llvm.org GIT mirror llvm / 8e5dad5
[Unittests] Change linker flags of dynamic library tests A recent change https://reviews.llvm.org/D46898 which had no intended behavior change, actually modified the linker flags used when linking the dynamic libraries used by the DynamicLibraryTests unit test. This made the test fail in our testing environment which runs the tests from an NFS share. Prior to D46898 the two libraries used by the test were different (because the library name used to be embedded into the binary), and after the change they became bit-to-bit identical. This causes dlopen to return the same handle when these two libraries are loaded from an NFS share, and the test expects two different handles. This patch reverts the part of D46898 that is responsible for changing the linker flags. Differential Revision: https://reviews.llvm.org/D47469 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334394 91177308-0d34-0410-b5e6-96231b3b80d8 Mikhail Maltsev 1 year, 4 months ago
1 changed file(s) with 8 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1414 export_executable_symbols(DynamicLibraryTests)
1515
1616 function(dynlib_add_module NAME)
17 add_library(${NAME} MODULE
17 add_library(${NAME} SHARED
1818 PipSqueak.cpp
1919 )
2020 set_target_properties(${NAME} PROPERTIES FOLDER "Tests")
3232 add_dependencies(DynamicLibraryTests ${NAME})
3333 endfunction(dynlib_add_module)
3434
35 # Revert -Wl,-z,nodelete on this test since it relies on the file
36 # being unloaded.
37 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
38 string(REPLACE "-Wl,-z,nodelete" "" CMAKE_SHARED_LINKER_FLAGS
39 ${CMAKE_SHARED_LINKER_FLAGS})
40 endif()
41
3542 dynlib_add_module(PipSqueak)
3643 dynlib_add_module(SecondLib)