diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-01-24 18:00:44 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-01-24 18:00:44 +0000 |
commit | 9136f2112ca67bf360ee64b6546abea9dce0579c (patch) | |
tree | 40e64e5280f36a3a6803a02cca0594f023d327d2 /cmake/config-ix.cmake | |
parent | 1ac2060678edd88726e06ff19c9468211b41fc37 (diff) | |
download | llvm-9136f2112ca67bf360ee64b6546abea9dce0579c.tar.gz llvm-9136f2112ca67bf360ee64b6546abea9dce0579c.tar.bz2 llvm-9136f2112ca67bf360ee64b6546abea9dce0579c.tar.xz |
Undo an over zealous rename. This bit of the CMake build really is
dealing in the host triple, be honest about it and document the decision
to default the target triple to the host triple unless overridden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index b380a48637..f6eeea9ee6 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -287,15 +287,18 @@ include(CheckCXXCompilerFlag) check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) -include(GetTargetTriple) -get_target_triple(LLVM_DEFAULT_TARGET_TRIPLE) +include(GetHostTriple) +get_host_triple(LLVM_HOST_TRIPLE) +# By default, we target the host, but this can be overridden at CMake +# invocation time. +set(LLVM_DEFAULT_TARGET_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_DEFAULT_TARGET_TRIPLE}) + string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOST_TRIPLE}) endif () if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86") |