[PATCH] D57757: [scudo][standalone] Do not error out on spurious C(XX) flags
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 11:45:28 PST 2019
cryptoad updated this revision to Diff 185603.
cryptoad added a comment.
Settle on removing `-stdlib=...` from the CMake CXX flags.
This prevents a `-Werror,-Wunused-command-line-argument` error when compiling with
`-DLLVM_ENABLE_LIBCXX=ON -DCLANG_DEFAULT_CXX_STDLIB=libc++ -DCOMPILER_RT_ENABLE_WERROR=ON`
or the like.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57757/new/
https://reviews.llvm.org/D57757
Files:
lib/scudo/standalone/CMakeLists.txt
Index: lib/scudo/standalone/CMakeLists.txt
===================================================================
--- lib/scudo/standalone/CMakeLists.txt
+++ lib/scudo/standalone/CMakeLists.txt
@@ -6,9 +6,11 @@
list(APPEND SCUDO_CFLAGS
-Wall
- -Werror
-nostdinc++)
+# Remove -stdlib= which is unused when passing -nostdinc++.
+string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding SCUDO_CFLAGS)
append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SCUDO_CFLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57757.185603.patch
Type: text/x-patch
Size: 591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190206/e43c772d/attachment.bin>
More information about the llvm-commits
mailing list