[compiler-rt] r250957 - [msan] Build unit test shared library code with -fPIC.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 15:13:36 PDT 2015


Author: eugenis
Date: Wed Oct 21 17:13:36 2015
New Revision: 250957

URL: http://llvm.org/viewvc/llvm-project?rev=250957&view=rev
Log:
[msan] Build unit test shared library code with -fPIC.

Modified:
    compiler-rt/trunk/lib/msan/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/msan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/CMakeLists.txt?rev=250957&r1=250956&r2=250957&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/tests/CMakeLists.txt Wed Oct 21 17:13:36 2015
@@ -51,10 +51,6 @@ set(MSAN_UNITTEST_LINK_FLAGS
 )
 
 append_list_if(COMPILER_RT_HAS_LIBDL -ldl MSAN_UNITTEST_LINK_FLAGS)
-set(MSAN_LOADABLE_LINK_FLAGS
-  -fsanitize=memory
-  -shared
-)
 
 # Compile source for the given architecture, using compiler
 # options in ${ARGN}, and add it to the object list.
@@ -107,7 +103,7 @@ macro(add_msan_tests_for_arch arch kind)
   # Instrumented loadable module objects.
   set(MSAN_INST_LOADABLE_OBJECTS)
   msan_compile(MSAN_INST_LOADABLE_OBJECTS ${MSAN_LOADABLE_SOURCE} ${arch} "${kind}"
-               ${MSAN_UNITTEST_INSTRUMENTED_CFLAGS} ${ARGN})
+               ${MSAN_UNITTEST_INSTRUMENTED_CFLAGS} "-fPIC" ${ARGN})
 
   # Instrumented loadable library tests.
   set(MSAN_LOADABLE_SO)




More information about the llvm-commits mailing list