[PATCH] D12639: [compiler-rt] Fix cross build when multiple targets are enabled.
Geoff Berry via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 4 11:06:06 PDT 2015
gberry created this revision.
gberry added a reviewer: samsonov.
gberry added a subscriber: llvm-commits.
Fix cross build if COMPILER_RT_TEST_TARGET_ARCH is specified as a
different arch than LLVM_NATIVE_ARCH.
http://reviews.llvm.org/D12639
Files:
cmake/config-ix.cmake
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -174,7 +174,7 @@
detect_target_arch()
set(COMPILER_RT_OS_SUFFIX "-android")
elseif(NOT APPLE) # Supported archs for Apple platforms are generated later
- if("${LLVM_NATIVE_ARCH}" STREQUAL "X86")
+ if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "x86")
if(NOT MSVC)
test_target_arch(x86_64 "" "-m64")
# FIXME: We build runtimes for both i686 and i386, as "clang -m32" may
@@ -189,14 +189,14 @@
test_target_arch(x86_64 "" "")
endif()
endif()
- elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")
+ elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "powerpc")
TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN)
if(HOST_IS_BIG_ENDIAN)
test_target_arch(powerpc64 "" "-m64")
else()
test_target_arch(powerpc64le "" "-m64")
endif()
- elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
+ elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mips")
# Gcc doesn't accept -m32/-m64 so we do the next best thing and use
# -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match
# clang's default CPU's. In the 64-bit case, we must also specify the ABI
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12639.34047.patch
Type: text/x-patch
Size: 1280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150904/d4b0a2fe/attachment.bin>
More information about the llvm-commits
mailing list