summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
-rw-r--r--llvm/cmake/modules/GetHostTriple.cmake8
-rw-r--r--llvm/lib/Support/Unix/Host.inc2
-rw-r--r--llvm/lib/Support/Windows/Host.inc2
4 files changed, 8 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 849e3ba9f27..b1e0d9ab794 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2927,10 +2927,11 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
Opts.FPMath = Args.getLastArgValue(OPT_mfpmath);
Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature);
Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version);
- Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple));
+ Opts.Triple = Args.getLastArgValue(OPT_triple);
// Use the default target triple if unspecified.
if (Opts.Triple.empty())
Opts.Triple = llvm::sys::getDefaultTargetTriple();
+ Opts.Triple = llvm::Triple::normalize(Opts.Triple);
Opts.OpenCLExtensionsAsWritten = Args.getAllArgValues(OPT_cl_ext_EQ);
Opts.ForceEnableInt128 = Args.hasArg(OPT_fforce_enable_int128);
Opts.NVPTXUseShortPointers = Args.hasFlag(
diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake
index 019188a59cc..7b842450b72 100644
--- a/llvm/cmake/modules/GetHostTriple.cmake
+++ b/llvm/cmake/modules/GetHostTriple.cmake
@@ -4,15 +4,15 @@
function( get_host_triple var )
if( MSVC )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
- set( value "x86_64-pc-win32" )
+ set( value "x86_64-pc-windows-msvc" )
else()
- set( value "i686-pc-win32" )
+ set( value "i686-pc-windows-msvc" )
endif()
elseif( MINGW AND NOT MSYS )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
- set( value "x86_64-w64-mingw32" )
+ set( value "x86_64-w64-windows-gnu" )
else()
- set( value "i686-pc-mingw32" )
+ set( value "i686-pc-windows-gnu" )
endif()
else( MSVC )
set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
diff --git a/llvm/lib/Support/Unix/Host.inc b/llvm/lib/Support/Unix/Host.inc
index 5580e63893c..b65f84bf444 100644
--- a/llvm/lib/Support/Unix/Host.inc
+++ b/llvm/lib/Support/Unix/Host.inc
@@ -64,5 +64,5 @@ std::string sys::getDefaultTargetTriple() {
TargetTripleString = EnvTriple;
#endif
- return Triple::normalize(TargetTripleString);
+ return TargetTripleString;
}
diff --git a/llvm/lib/Support/Windows/Host.inc b/llvm/lib/Support/Windows/Host.inc
index 90a6fb31670..58c4dc5d678 100644
--- a/llvm/lib/Support/Windows/Host.inc
+++ b/llvm/lib/Support/Windows/Host.inc
@@ -30,5 +30,5 @@ std::string sys::getDefaultTargetTriple() {
Triple = EnvTriple;
#endif
- return Triple::normalize(Triple);
+ return Triple;
}
OpenPOWER on IntegriCloud