summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-01-05 03:41:41 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-01-05 03:41:41 +0000
commitbbb82ca4e685c9b8e259292ba31d3348984f17e4 (patch)
treedbc9dd340f7692c74dd170d23e38ccce60145c16
parentb2ce2b6805c2c517c40790ae67f60cbbd611802f (diff)
downloadbcm5719-llvm-bbb82ca4e685c9b8e259292ba31d3348984f17e4.tar.gz
bcm5719-llvm-bbb82ca4e685c9b8e259292ba31d3348984f17e4.zip
[gtest] Teach the sanitizer's custom gtest compilations to disable
a warning that 'gtest-all.cc' directly triggers in the newer 1.8.0 version. This should fix a warning in folks' build and bring a couple of -Werror bots back to life. llvm-svn: 291070
-rw-r--r--compiler-rt/cmake/Modules/AddCompilerRT.cmake1
-rw-r--r--compiler-rt/cmake/config-ix.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index 42ae7ad1ecd..c2863d5f2f8 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -256,6 +256,7 @@ set(COMPILER_RT_GTEST_CFLAGS
)
append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_UNITTEST_CFLAGS)
+append_list_if(COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG -Wno-covered-switch-default COMPILER_RT_UNITTEST_CFLAGS)
if(MSVC)
# clang doesn't support exceptions on Windows yet.
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 5e2eefc30e0..7d9aa446be2 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -57,6 +57,7 @@ check_cxx_compiler_flag("-Werror -Wgnu" COMPILER_RT_HAS_WGNU_FLAG
check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG)
check_cxx_compiler_flag("-Werror -Wvariadic-macros" COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG)
check_cxx_compiler_flag("-Werror -Wunused-parameter" COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG)
+check_cxx_compiler_flag("-Werror -Wcovered-switch-default" COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG)
check_cxx_compiler_flag(/W4 COMPILER_RT_HAS_W4_FLAG)
check_cxx_compiler_flag(/WX COMPILER_RT_HAS_WX_FLAG)
OpenPOWER on IntegriCloud