Browse Source

Fixed ToolSetToUse to work with the latest Clang expectations.

pull/355/head
triton 11 years ago
parent
commit
fe56198ceb
  1. 10
      src/Generator/Driver.cs

10
src/Generator/Driver.cs

@ -1,6 +1,7 @@
using System; using System;
using System.CodeDom.Compiler; using System.CodeDom.Compiler;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@ -133,6 +134,15 @@ namespace CppSharp
LanguageVersion = Options.LanguageVersion LanguageVersion = Options.LanguageVersion
}; };
// This eventually gets passed to Clang's MSCompatibilityVersion, which
// is in turn used to derive the value of the built-in define _MSC_VER.
// It used to receive a 4-digit based identifier but now expects a full
// version MSVC digit, so check if we still have the old version and
// convert to the right format.
if (Options.ToolSetToUse.ToString(CultureInfo.InvariantCulture).Length == 4)
Options.ToolSetToUse *= 100000;
for (uint i = 0; i < Options.ArgumentsCount; ++i) for (uint i = 0; i < Options.ArgumentsCount; ++i)
{ {
var arg = Options.getArguments(i); var arg = Options.getArguments(i);

Loading…
Cancel
Save