From: Reid Kleckner Date: Wed, 18 Sep 2013 00:33:59 +0000 (+0000) Subject: Claim compatibility with VS 2012 by default X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c64c183054f6528aff4d6cca6aba462033ed1a1;p=clang Claim compatibility with VS 2012 by default This will define _MSC_VER to 1700 by default and avoid linker errors from /failifmismatch linker directives in the C++ standard headers. Most people trying out the Visual Studio integration are using 2012, since that's the only version that clang-format works with. This way they don't have to pass funky -Xclang -fmsc-version=1700 flags just to link against the standard C++ runtime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190908 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 3dde81c597..a728b4dc81 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3116,13 +3116,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, true)))) CmdArgs.push_back("-fms-compatibility"); - // -fmsc-version=1300 is default. + // -fmsc-version=1700 is default. if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, getToolChain().getTriple().getOS() == llvm::Triple::Win32) || Args.hasArg(options::OPT_fmsc_version)) { StringRef msc_ver = Args.getLastArgValue(options::OPT_fmsc_version); if (msc_ver.empty()) - CmdArgs.push_back("-fmsc-version=1300"); + CmdArgs.push_back("-fmsc-version=1700"); else CmdArgs.push_back(Args.MakeArgString("-fmsc-version=" + msc_ver)); }