From d66ad6c57115e85487e8a29b1e073305690a9be2 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Sat, 4 May 2013 07:36:23 +0000 Subject: Allow host triple to be correctly overridden in CMake builds The intended semantics mirror autoconf, where the user is able to specify a host triple, but if it's left to the build system then "config.guess" is invoked for the default. This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to fit in with the style of the surrounding defines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181112 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 94916b83dc..11c6344a1c 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -340,12 +340,13 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif() endif() -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_HOSTTRIPLE "${LLVM_HOST_TRIPLE}") +include(GetHostTriple) +get_host_triple(LLVM_INFERRED_HOST_TRIPLE) + +set(LLVM_HOST_TRIPLE "${LLVM_INFERRED_HOST_TRIPLE}" CACHE STRING + "Host on which LLVM binaries will run") # Determine the native architecture. string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH) -- cgit v1.2.3-18-g5258