From: Sebastian Pop Date: Tue, 1 Nov 2011 21:31:44 +0000 (+0000) Subject: rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=de2e0b5e6d5aa7eccf62df17b86c31b39732bf86;p=oota-llvm.git rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143501 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 7586ba7a8ae..6e9d8485866 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1453,8 +1453,8 @@ AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", [Installation directory for man pages]) AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) -AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target", - [Host triple we were built on]) +AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target", + [Target triple LLVM will generate code for by default]) # Determine which bindings to build. if test "$BINDINGS_TO_BUILD" = auto ; then diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 18549a3b22c..62699fa5aaf 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -286,15 +286,14 @@ include(CheckCXXCompilerFlag) check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) include(GetTargetTriple) -get_target_triple(LLVM_HOSTTRIPLE) +get_target_triple(LLVM_DEFAULT_TARGET_TRIPLE) -# FIXME: We don't distinguish the target and the host. :( -set(TARGET_TRIPLE "${LLVM_HOSTTRIPLE}") +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_HOSTTRIPLE}) + string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE}) endif () if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86") diff --git a/configure b/configure index a10276bad42..ae6be9d535e 100755 --- a/configure +++ b/configure @@ -20865,7 +20865,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define LLVM_HOSTTRIPLE "$target" +#define LLVM_DEFAULT_TARGET_TRIPLE "$target" _ACEOF diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index e44d429dfcf..69e3eefb116 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -555,7 +555,7 @@ #cmakedefine01 LLVM_HAS_ATOMICS /* Host triple we were built on */ -#cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}" +#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" /* Installation directory for include files */ #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}" diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index 3670de557f4..813c6ebc383 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -543,6 +543,9 @@ /* Installation directory for data files */ #undef LLVM_DATADIR +/* Target triple LLVM will generate code for by default */ +#undef LLVM_DEFAULT_TARGET_TRIPLE + /* Installation directory for documentation */ #undef LLVM_DOCSDIR @@ -552,9 +555,6 @@ /* Has gcc/MSVC atomic intrinsics */ #undef LLVM_HAS_ATOMICS -/* Host triple we were built on */ -#undef LLVM_HOSTTRIPLE - /* Installation directory for include files */ #undef LLVM_INCLUDEDIR diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 4147fd1ff66..838388666c4 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -35,7 +35,7 @@ #cmakedefine01 LLVM_HAS_ATOMICS /* Host triple we were built on */ -#cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}" +#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" /* Installation directory for include files */ #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}" diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in index b2257f37bbc..1dd7ed69614 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -35,7 +35,7 @@ #undef LLVM_HAS_ATOMICS /* Host triple we were built on */ -#undef LLVM_HOSTTRIPLE +#undef LLVM_DEFAULT_TARGET_TRIPLE /* Installation directory for include files */ #undef LLVM_INCLUDEDIR diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc index dda3ce2c6f9..dc1641722b1 100644 --- a/lib/Support/Unix/Host.inc +++ b/lib/Support/Unix/Host.inc @@ -36,10 +36,7 @@ static std::string getOSVersion() { } std::string sys::getHostTriple() { - // FIXME: Derive directly instead of relying on the autoconf generated - // variable. - - StringRef HostTripleString(LLVM_HOSTTRIPLE); + StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE); std::pair ArchSplit = HostTripleString.split('-'); // Normalize the arch, since the host triple may not actually match the host. diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc index 733830e82f0..5bbc74e5a39 100644 --- a/lib/Support/Windows/Host.inc +++ b/lib/Support/Windows/Host.inc @@ -18,6 +18,5 @@ using namespace llvm; std::string sys::getHostTriple() { - // FIXME: Adapt to running version. - return LLVM_HOSTTRIPLE; + return LLVM_DEFAULT_TARGET_TRIPLE; } diff --git a/projects/sample/autoconf/configure.ac b/projects/sample/autoconf/configure.ac index a5d786d78ee..ab158921273 100644 --- a/projects/sample/autoconf/configure.ac +++ b/projects/sample/autoconf/configure.ac @@ -1386,8 +1386,8 @@ AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", [Installation directory for man pages]) AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) -AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target", - [Host triple we were built on]) +AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target", + [Target triple LLVM will generate code for by default]) # Determine which bindings to build. if test "$BINDINGS_TO_BUILD" = auto ; then diff --git a/projects/sample/configure b/projects/sample/configure index 1045b5de8aa..dd4305d99c6 100755 --- a/projects/sample/configure +++ b/projects/sample/configure @@ -20815,7 +20815,7 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define LLVM_HOSTTRIPLE "$target" +#define LLVM_DEFAULT_TARGET_TRIPLE "$target" _ACEOF