diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-02-01 13:57:24 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-02-01 13:57:24 +0000 |
commit | 0f69c8b59e94467b3c9c0a38bfb84edc55c1076b (patch) | |
tree | 9ed334880db3e00d9a429b2b6f164c8d0f18f767 /lib/msan | |
parent | dde86494a0677c0a62d0e2a7a7190564b4b33e06 (diff) |
[CMake] Remove -stdlib= which is unused when passing -nostdinc++
This avoids the warnings when building with LLVM_ENABLE_LIBCXX
which automatically adds -stdlib=libc++ to CMAKE_CXX_FLAGS.
Differential Revision: https://reviews.llvm.org/D42238
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@323969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan')
-rw-r--r-- | lib/msan/tests/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/msan/tests/CMakeLists.txt b/lib/msan/tests/CMakeLists.txt index fb7f563bc..84e05a9c8 100644 --- a/lib/msan/tests/CMakeLists.txt +++ b/lib/msan/tests/CMakeLists.txt @@ -37,6 +37,9 @@ set(MSAN_UNITTEST_COMMON_CFLAGS -Werror=sign-compare -Wno-gnu-zero-variadic-macro-arguments ) +# Remove -stdlib= which is unused when passing -nostdinc++. +string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + set(MSAN_UNITTEST_INSTRUMENTED_CFLAGS ${MSAN_UNITTEST_COMMON_CFLAGS} -fsanitize=memory |