[compiler-rt] r314512 - [CMake] Fix configuration on PowerPC with sanitizers
Jonas Hahnfeld via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 06:32:39 PDT 2017
Author: hahnfeld
Date: Fri Sep 29 06:32:39 2017
New Revision: 314512
URL: http://llvm.org/viewvc/llvm-project?rev=314512&view=rev
Log:
[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
Modified:
compiler-rt/trunk/cmake/base-config-ix.cmake
Modified: compiler-rt/trunk/cmake/base-config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/base-config-ix.cmake?rev=314512&r1=314511&r2=314512&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/base-config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/base-config-ix.cmake Fri Sep 29 06:32:39 2017
@@ -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()
More information about the llvm-commits
mailing list