rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE

llvm-svn: 143501
This commit is contained in:
Sebastian Pop 2011-11-01 21:31:44 +00:00
parent 26b43f8a5a
commit 69b2b86143
11 changed files with 17 additions and 22 deletions

View File

@ -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

View File

@ -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")

2
configure vendored
View File

@ -20865,7 +20865,7 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
#define LLVM_HOSTTRIPLE "$target"
#define LLVM_DEFAULT_TARGET_TRIPLE "$target"
_ACEOF

View File

@ -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}"

View File

@ -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

View File

@ -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}"

View File

@ -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

View File

@ -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<StringRef, StringRef> ArchSplit = HostTripleString.split('-');
// Normalize the arch, since the host triple may not actually match the host.

View File

@ -18,6 +18,5 @@
using namespace llvm;
std::string sys::getHostTriple() {
// FIXME: Adapt to running version.
return LLVM_HOSTTRIPLE;
return LLVM_DEFAULT_TARGET_TRIPLE;
}

View File

@ -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

View File

@ -20815,7 +20815,7 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
#define LLVM_HOSTTRIPLE "$target"
#define LLVM_DEFAULT_TARGET_TRIPLE "$target"
_ACEOF