summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorSumanth Gundapaneni <sgundapa@codeaurora.org>2015-12-09 22:26:38 +0000
committerSumanth Gundapaneni <sgundapa@codeaurora.org>2015-12-09 22:26:38 +0000
commitdbb8a1d8e7317b423ac4d4502e9ba67a3856ed3c (patch)
tree60640603264db28a8a9ca06ae74253350616f2d4 /compiler-rt
parent903ab8a2a3d74a7e71b64057530c0d93a94a19d3 (diff)
downloadbcm5719-llvm-dbb8a1d8e7317b423ac4d4502e9ba67a3856ed3c.tar.gz
bcm5719-llvm-dbb8a1d8e7317b423ac4d4502e9ba67a3856ed3c.zip
Fix the target specific "-msse3" flag check in CMake. NFC
msse3 is a target dependent flag and must be guarded as check_cxx_compiler_flag() checks only for compiler error messages and ignores warnings. Earlier COMPILER_RT_HAS_MSSE3_FLAG is set to "TRUE" for all targets as clang emits warnings and the compilation spits unnecessary warnings for non-X86 targets. This issue is fixed by coupling the flag with "-Werror" Differential Revision: http://reviews.llvm.org/D15362 llvm-svn: 255165
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/cmake/config-ix.cmake10
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index f953704c697..700422b7cb7 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -27,7 +27,7 @@ check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUN
check_cxx_compiler_flag(-std=c++11 COMPILER_RT_HAS_STD_CXX11_FLAG)
check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG)
-check_cxx_compiler_flag(-msse3 COMPILER_RT_HAS_MSSE3_FLAG)
+check_cxx_compiler_flag("-Werror -msse3" COMPILER_RT_HAS_MSSE3_FLAG)
check_cxx_compiler_flag(-std=c99 COMPILER_RT_HAS_STD_C99_FLAG)
check_cxx_compiler_flag(--sysroot=. COMPILER_RT_HAS_SYSROOT_FLAG)
@@ -574,14 +574,6 @@ else()
set(COMPILER_RT_HAS_UBSAN FALSE)
endif()
-# -msse3 flag is not valid for Mips therefore clang gives a warning
-# message with -msse3. But check_c_compiler_flags() checks only for
-# compiler error messages. Therefore COMPILER_RT_HAS_MSSE3_FLAG turns out to be
-# true on Mips, so we make it false here.
-if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
- set(COMPILER_RT_HAS_MSSE3_FLAG FALSE)
-endif()
-
if (COMPILER_RT_HAS_SANITIZER_COMMON AND SAFESTACK_SUPPORTED_ARCH AND
OS_NAME MATCHES "Darwin|Linux|FreeBSD")
set(COMPILER_RT_HAS_SAFESTACK TRUE)
OpenPOWER on IntegriCloud