From: Hans Wennborg Date: Fri, 28 Mar 2014 01:19:04 +0000 (+0000) Subject: clang-cl wants MSVC-style win32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9f38c4bc0b7e1e8f4473a34ed00eb5bde9ee2a6;p=clang clang-cl wants MSVC-style win32 This should fix the clang-cl tests after the Windows target triple canonicalization (r204978) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204985 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 914efa638d..bd3a6e928e 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -335,9 +335,11 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // 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))