r190908 - Claim compatibility with VS 2012 by default

Reid Kleckner reid at kleckner.net
Tue Sep 17 17:33:59 PDT 2013


Author: rnk
Date: Tue Sep 17 19:33:59 2013
New Revision: 190908

URL: http://llvm.org/viewvc/llvm-project?rev=190908&view=rev
Log:
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.

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

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=190908&r1=190907&r2=190908&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Sep 17 19:33:59 2013
@@ -3116,13 +3116,13 @@ void Clang::ConstructJob(Compilation &C,
                                  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));
   }





More information about the cfe-commits mailing list