diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-09-29 13:32:39 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-09-29 13:32:39 +0000 |
commit | ddbb0926a0ae1d52535782a79e531c0f5c7c07c1 (patch) | |
tree | fb96ad47bff79fbfcc86ce2da86c4d02dbecf7d8 /compiler-rt | |
parent | 963da5b1191f0ec084247252666d3f669fdaf71c (diff) | |
download | bcm5719-llvm-ddbb0926a0ae1d52535782a79e531c0f5c7c07c1.tar.gz bcm5719-llvm-ddbb0926a0ae1d52535782a79e531c0f5c7c07c1.zip |
[CMake] Fix configuration on PowerPC with sanitizers
TEST_BIG_ENDIAN() performs compile tests that will fail with
-nodefaultlibs when building under LLVM_USE_SANITIZER.
Differential Revision: https://reviews.llvm.org/D38277
llvm-svn: 314512
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/cmake/base-config-ix.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake index 55f322538cc..45e490481bf 100644 --- a/compiler-rt/cmake/base-config-ix.cmake +++ b/compiler-rt/cmake/base-config-ix.cmake @@ -148,7 +148,13 @@ macro(test_targets) endif() endif() elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc") + # Strip out -nodefaultlibs when calling TEST_BIG_ENDIAN. Configuration + # will fail with this option when building with a sanitizer. + cmake_push_check_state() + string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN) + cmake_pop_check_state() + if(HOST_IS_BIG_ENDIAN) test_target_arch(powerpc64 "" "-m64") else() |