r204985 - clang-cl wants MSVC-style win32

Hans Wennborg hans at hanshq.net
Thu Mar 27 18:19:04 PDT 2014


Author: hans
Date: Thu Mar 27 20:19:04 2014
New Revision: 204985

URL: http://llvm.org/viewvc/llvm-project?rev=204985&view=rev
Log:
clang-cl wants MSVC-style win32

This should fix the clang-cl tests after the Windows target triple
canonicalization (r204978)

Modified:
    cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=204985&r1=204984&r2=204985&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Mar 27 20:19:04 2014
@@ -335,9 +335,11 @@ Compilation *Driver::BuildCompilation(Ar
   // FIXME: DefaultTargetTriple is used by the target-prefixed calls to as/ld
   // and getToolChain is const.
   if (IsCLMode()) {
-    // clang-cl targets Win32.
+    // clang-cl targets MSVC-style Win32.
     llvm::Triple T(DefaultTargetTriple);
     T.setOSName(llvm::Triple::getOSTypeName(llvm::Triple::Win32));
+    T.setEnvironmentName(llvm::Triple::getEnvironmentTypeName(
+          llvm::Triple::MSVC));
     DefaultTargetTriple = T.str();
   }
   if (const Arg *A = Args->getLastArg(options::OPT_target))





More information about the cfe-commits mailing list