summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2019-02-07 15:44:36 +0000
committerKostya Kortchinsky <kostyak@google.com>2019-02-07 15:44:36 +0000
commit7547170ca44446e433b45e93e057adb3cdb0b9eb (patch)
tree6f1e03e57e429ed16b7b66292fa29a335fd69a44
parent84e5bf0c9519b7ba219b9f1224323b7007f9c7fa (diff)
downloadbcm5719-llvm-7547170ca44446e433b45e93e057adb3cdb0b9eb.tar.gz
bcm5719-llvm-7547170ca44446e433b45e93e057adb3cdb0b9eb.zip
[scudo][standalone] Do not error out on spurious C(XX) flags
Summary: The standalone Scudo version is being built with `-Werror` which can be tripped by extraneous command line arguments. We have little control over those as they can be passed down to us by `CMAKE_C(XX)_FLAGS`, the reported scenario involving `-stdlib=libc++` (see https://reviews.llvm.org/D57412#1384504). To work around this, disable `-Wunused-command-line-argument`. Reviewers: eugenis, vitalybuka, Eugene.Zelenko Reviewed By: eugenis Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D57757 llvm-svn: 353418
-rw-r--r--compiler-rt/lib/scudo/standalone/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
index 82d0840da0c..3b45d3fc6bc 100644
--- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt
+++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
@@ -6,9 +6,11 @@ set(SCUDO_CFLAGS)
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)
OpenPOWER on IntegriCloud