forked from OSchip/llvm-project
[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
This commit is contained in:
parent
84e5bf0c95
commit
7547170ca4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue