summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2012-01-04 19:47:22 +0000
committerSebastian Pop <spop@codeaurora.org>2012-01-04 19:47:22 +0000
commit0f357d6c2240393b53d30cf79c2cd583192e5ed9 (patch)
tree642c100b83b81b7f83bfe293c75df67f1ebff3e3 /llvm/cmake
parentaac3e06bf73214a1f44dd40e98c9930b759ded38 (diff)
downloadbcm5719-llvm-0f357d6c2240393b53d30cf79c2cd583192e5ed9.tar.gz
bcm5719-llvm-0f357d6c2240393b53d30cf79c2cd583192e5ed9.zip
use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
Get back getHostTriple. For JIT compilation, use the host triple instead of the default target: this fixes some JIT testcases that used to fail when the compiler has been configured as a cross compiler. llvm-svn: 147542
Diffstat (limited to 'llvm/cmake')
-rwxr-xr-xllvm/cmake/config-ix.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index b380a48637f..4ee433ae941 100755
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -288,13 +288,16 @@ include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG)
include(GetTargetTriple)
+get_target_triple(LLVM_HOST_TRIPLE)
get_target_triple(LLVM_DEFAULT_TARGET_TRIPLE)
+set(HOST_TRIPLE "${LLVM_HOST_TRIPLE}")
set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
# Determine the native architecture.
string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH)
if( LLVM_NATIVE_ARCH STREQUAL "host" )
+ string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOST_TRIPLE})
string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE})
endif ()
OpenPOWER on IntegriCloud