From d9f38c4bc0b7e1e8f4473a34ed00eb5bde9ee2a6 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 28 Mar 2014 01:19:04 +0000 Subject: [PATCH] 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 --- lib/Driver/Driver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.40.0