[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
Tue Feb 5 11:05:53 PST 2019


cryptoad updated this revision to Diff 185354.
cryptoad added a comment.

Remove the default `-Werror` and use `COMPILER_RT_ENABLE_WERROR` instead.


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,14 @@
 
 list(APPEND SCUDO_CFLAGS
   -Wall
-  -Werror
   -nostdinc++)
 
+# Do not error out on spurious flags. They can be passed via CMAKE_CXX_FLAGS
+# for example, so we have very little control on those.
+if(COMPILER_RT_ENABLE_WERROR)
+  append_string_if(COMPILER_RT_HAS_WERROR_FLAG -Wno-unused-command-line-argument SCUDO_CFLAGS)
+endif()
+
 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.185354.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/2dd52d13/attachment.bin>


More information about the llvm-commits mailing list