From fb87d673df5935b7a6ef1e41986f2a9d6d89a7d2 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 8 Oct 2015 22:21:36 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249759 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/msan/tests/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/msan/tests') diff --git a/lib/msan/tests/CMakeLists.txt b/lib/msan/tests/CMakeLists.txt index 0f66e2518..e3ad4abe5 100644 --- a/lib/msan/tests/CMakeLists.txt +++ b/lib/msan/tests/CMakeLists.txt @@ -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++ ) -- cgit v1.2.3