[Installation directory for man pages])
AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
[Time at which LLVM was configured])
-AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host",
- [Host triple LLVM will run on])
AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target",
[Target triple LLVM will generate code for by default])
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 ()
cat >>confdefs.h <<_ACEOF
-#define LLVM_HOST_TRIPLE "$host"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
#define LLVM_DEFAULT_TARGET_TRIPLE "$target"
_ACEOF
/* Has gcc/MSVC atomic intrinsics */
#cmakedefine01 LLVM_HAS_ATOMICS
-/* Host triple LLVM will run on */
-#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"
-
/* Installation directory for include files */
#cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"
/* Has gcc/MSVC atomic intrinsics */
#undef LLVM_HAS_ATOMICS
-/* Host triple LLVM will run on */
-#undef LLVM_HOST_TRIPLE
-
/* Installation directory for include files */
#undef LLVM_INCLUDEDIR
/* Has gcc/MSVC atomic intrinsics */
#cmakedefine01 LLVM_HAS_ATOMICS
-/* Host triple LLVM will run on */
-#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"
-
/* Installation directory for include files */
#cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"
/* Has gcc/MSVC atomic intrinsics */
#undef LLVM_HAS_ATOMICS
-/* Host triple LLVM will run on */
-#undef LLVM_HOST_TRIPLE
-
/* Installation directory for include files */
#undef LLVM_INCLUDEDIR
return !isLittleEndianHost();
}
- /// getHostTriple() - Return the host where the compiler will be running.
- ///
- /// The host triple is a string in the format of:
- /// CPU_TYPE-VENDOR-OPERATING_SYSTEM
- /// or
- /// CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM
- std::string getHostTriple();
-
/// getDefaultTargetTriple() - Return the default target triple the compiler
/// has been configured to produce code for.
///
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
#endif
<< " Default target: " << sys::getDefaultTargetTriple() << '\n'
- << " Host: " << sys::getHostTriple() << '\n'
<< " Host CPU: " << CPU << '\n';
}
void operator=(bool OptionWasSpecified) {
}
const Target *TargetRegistry::getClosestTargetForJIT(std::string &Error) {
- const Target *TheTarget = lookupTarget(sys::getHostTriple(), Error);
+ const Target *TheTarget = lookupTarget(sys::getDefaultTargetTriple(), Error);
if (TheTarget && !TheTarget->hasJIT()) {
Error = "No JIT compatible target available for this host";
return info.release;
}
-std::string getTriple(StringRef &TripleString) {
- std::pair<StringRef, StringRef> ArchSplit = TripleString.split('-');
+std::string sys::getDefaultTargetTriple() {
+ StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
+ std::pair<StringRef, StringRef> ArchSplit = TargetTripleString.split('-');
+
+ // Normalize the arch, since the target triple may not actually match the target.
std::string Arch = ArchSplit.first;
+
std::string Triple(Arch);
Triple += '-';
Triple += ArchSplit.second;
return Triple;
}
-
-std::string sys::getDefaultTargetTriple() {
- StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
- return getTriple(TargetTripleString);
-}
-
-std::string sys::getHostTriple() {
- StringRef HostTripleString(LLVM_HOST_TRIPLE);
- return getTriple(HostTripleString);
-}
std::string sys::getDefaultTargetTriple() {
return LLVM_DEFAULT_TARGET_TRIPLE;
}
-
-std::string sys::getHostTriple() {
- return LLVM_HOST_TRIPLE;
-}
[Installation directory for man pages])
AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
[Time at which LLVM was configured])
-AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host",
- [Host triple LLVM will run on])
AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target",
[Target triple LLVM will generate code for by default])
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1.*)
+freebsd1*)
dynamic_linker=no
;;
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123].*) objformat=aout ;;
+ freebsd[123]*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2.*)
+ freebsd2*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10412 "configure"
+#line 10423 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
cat >>confdefs.h <<_ACEOF
-#define LLVM_HOST_TRIPLE "$host"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
#define LLVM_DEFAULT_TARGET_TRIPLE "$target"
_ACEOF