[compiler-rt] r249759 - Fix msan tests build.

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


Author: eugenis
Date: Thu Oct  8 17:21:36 2015
New Revision: 249759

URL: http://llvm.org/viewvc/llvm-project?rev=249759&view=rev
Log:
Fix msan tests build.

CMake build rules listed -I flags for two different libc++ header
locations which broke when libc++ headers started using include_next.

Also change -I to -isystem to avoid compiler warning about
include_next.

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=249759&r1=249758&r2=249759&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/tests/CMakeLists.txt Thu Oct  8 17:21:36 2015
@@ -18,13 +18,13 @@ set(MSAN_UNITTEST_HEADERS
   ../../../include/sanitizer/msan_interface.h
 )
 set(MSAN_UNITTEST_COMMON_CFLAGS
-  -I${COMPILER_RT_LIBCXX_PATH}/include
+  -nostdinc++
+  -isystem ${COMPILER_RT_LIBCXX_PATH}/include
   ${COMPILER_RT_TEST_CFLAGS}
   ${COMPILER_RT_GTEST_CFLAGS}
   -I${COMPILER_RT_SOURCE_DIR}/include
   -I${COMPILER_RT_SOURCE_DIR}/lib
   -I${COMPILER_RT_SOURCE_DIR}/lib/msan
-  -stdlib=libc++
   -g
   -O2
   -fno-exceptions
@@ -44,6 +44,8 @@ set(MSAN_UNITTEST_INSTRUMENTED_CFLAGS
 )
 set(MSAN_UNITTEST_LINK_FLAGS
   -fsanitize=memory
+  # Don't need -stdlib=libc++ because we explicitly list libc++.so in the linker
+  # inputs.
   # FIXME: we build libcxx without cxxabi and need libstdc++ to provide it.
   -lstdc++
 )




More information about the llvm-commits mailing list