[PATCH] D46910: [Support] Avoid normalization in sys::getDefaultTargetTriple
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 19:56:57 PDT 2018
phosek updated this revision to Diff 147431.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D46910
Files:
clang/lib/Frontend/CompilerInvocation.cpp
llvm/cmake/modules/GetHostTriple.cmake
llvm/lib/Support/Unix/Host.inc
llvm/lib/Support/Windows/Host.inc
Index: llvm/lib/Support/Windows/Host.inc
===================================================================
--- llvm/lib/Support/Windows/Host.inc
+++ llvm/lib/Support/Windows/Host.inc
@@ -30,5 +30,5 @@
Triple = EnvTriple;
#endif
- return Triple::normalize(Triple);
+ return Triple;
}
Index: llvm/lib/Support/Unix/Host.inc
===================================================================
--- llvm/lib/Support/Unix/Host.inc
+++ llvm/lib/Support/Unix/Host.inc
@@ -64,5 +64,5 @@
TargetTripleString = EnvTriple;
#endif
- return Triple::normalize(TargetTripleString);
+ return TargetTripleString;
}
Index: llvm/cmake/modules/GetHostTriple.cmake
===================================================================
--- llvm/cmake/modules/GetHostTriple.cmake
+++ 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)
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -2916,10 +2916,11 @@
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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46910.147431.patch
Type: text/x-patch
Size: 2383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180518/6f1da8e1/attachment.bin>
More information about the llvm-commits
mailing list