llvm.org GIT mirror llvm / de2e0b5
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 Sebastian Pop 8 years ago
11 changed file(s) with 18 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
14521452 [Installation directory for man pages])
14531453 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
14541454 [Time at which LLVM was configured])
1455 AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target",
1456 [Host triple we were built on])
1455 AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target",
1456 [Target triple LLVM will generate code for by default])
14571457
14581458 # Determine which bindings to build.
14591459 if test "$BINDINGS_TO_BUILD" = auto ; then
285285 check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG)
286286
287287 include(GetTargetTriple)
288 get_target_triple(LLVM_HOSTTRIPLE)
289
290 # FIXME: We don't distinguish the target and the host. :(
291 set(TARGET_TRIPLE "${LLVM_HOSTTRIPLE}")
288 get_target_triple(LLVM_DEFAULT_TARGET_TRIPLE)
289
290 set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
292291
293292 # Determine the native architecture.
294293 string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH)
295294 if( LLVM_NATIVE_ARCH STREQUAL "host" )
296 string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOSTTRIPLE})
295 string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE})
297296 endif ()
298297
299298 if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86")
2086420864
2086520865
2086620866 cat >>confdefs.h <<_ACEOF
20867 #define LLVM_HOSTTRIPLE "$target"
20867 #define LLVM_DEFAULT_TARGET_TRIPLE "$target"
2086820868 _ACEOF
2086920869
2087020870
554554 #cmakedefine01 LLVM_HAS_ATOMICS
555555
556556 /* Host triple we were built on */
557 #cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}"
557 #cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
558558
559559 /* Installation directory for include files */
560560 #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"
542542 /* Installation directory for data files */
543543 #undef LLVM_DATADIR
544544
545 /* Target triple LLVM will generate code for by default */
546 #undef LLVM_DEFAULT_TARGET_TRIPLE
547
545548 /* Installation directory for documentation */
546549 #undef LLVM_DOCSDIR
547550
550553
551554 /* Has gcc/MSVC atomic intrinsics */
552555 #undef LLVM_HAS_ATOMICS
553
554 /* Host triple we were built on */
555 #undef LLVM_HOSTTRIPLE
556556
557557 /* Installation directory for include files */
558558 #undef LLVM_INCLUDEDIR
3434 #cmakedefine01 LLVM_HAS_ATOMICS
3535
3636 /* Host triple we were built on */
37 #cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}"
37 #cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
3838
3939 /* Installation directory for include files */
4040 #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"
3434 #undef LLVM_HAS_ATOMICS
3535
3636 /* Host triple we were built on */
37 #undef LLVM_HOSTTRIPLE
37 #undef LLVM_DEFAULT_TARGET_TRIPLE
3838
3939 /* Installation directory for include files */
4040 #undef LLVM_INCLUDEDIR
3535 }
3636
3737 std::string sys::getHostTriple() {
38 // FIXME: Derive directly instead of relying on the autoconf generated
39 // variable.
40
41 StringRef HostTripleString(LLVM_HOSTTRIPLE);
38 StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
4239 std::pair ArchSplit = HostTripleString.split('-');
4340
4441 // Normalize the arch, since the host triple may not actually match the host.
1717 using namespace llvm;
1818
1919 std::string sys::getHostTriple() {
20 // FIXME: Adapt to running version.
21 return LLVM_HOSTTRIPLE;
20 return LLVM_DEFAULT_TARGET_TRIPLE;
2221 }
13851385 [Installation directory for man pages])
13861386 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
13871387 [Time at which LLVM was configured])
1388 AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target",
1389 [Host triple we were built on])
1388 AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target",
1389 [Target triple LLVM will generate code for by default])
13901390
13911391 # Determine which bindings to build.
13921392 if test "$BINDINGS_TO_BUILD" = auto ; then
2081420814
2081520815
2081620816 cat >>confdefs.h <<_ACEOF
20817 #define LLVM_HOSTTRIPLE "$target"
20817 #define LLVM_DEFAULT_TARGET_TRIPLE "$target"
2081820818 _ACEOF
2081920819
2082020820