[PATCH] D42238: [CMake] Remove -stdlib= which is unused when passing -nostdinc++
Jonas Hahnfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 21 03:28:32 PST 2018
Hahnfeld updated this revision to Diff 130802.
Hahnfeld retitled this revision from "[CMake] Remove -stdlib= which is unused when passing -nostinc++" to "[CMake] Remove -stdlib= which is unused when passing -nostdinc++".
Hahnfeld added a comment.
Rebase and fix typo.
https://reviews.llvm.org/D42238
Files:
lib/fuzzer/CMakeLists.txt
lib/msan/tests/CMakeLists.txt
Index: lib/msan/tests/CMakeLists.txt
===================================================================
--- lib/msan/tests/CMakeLists.txt
+++ lib/msan/tests/CMakeLists.txt
@@ -37,6 +37,9 @@
-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
Index: lib/fuzzer/CMakeLists.txt
===================================================================
--- lib/fuzzer/CMakeLists.txt
+++ lib/fuzzer/CMakeLists.txt
@@ -35,6 +35,8 @@
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND COMPILER_RT_LIBCXX_PATH)
list(APPEND LIBFUZZER_CFLAGS -nostdinc++ -D_LIBCPP_ABI_VERSION=Fuzzer)
+ # Remove -stdlib= which is unused when passing -nostdinc++.
+ string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()
append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer LIBFUZZER_CFLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42238.130802.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180121/40cd0078/attachment.bin>
More information about the llvm-commits
mailing list