Browse Source

Fixed the parser generator to track Clang r204978.

Clang now models different Windows environments in the triple and we need to explicitly request the "MSVC" environment to get proper behavior when parsing MSVC headers.
pull/288/head
triton 11 years ago
parent
commit
7fb53dc3b0
  1. 7
      src/CppParser/Bindings/ParserGen.cs

7
src/CppParser/Bindings/ParserGen.cs

@ -57,6 +57,9 @@ namespace CppSharp @@ -57,6 +57,9 @@ namespace CppSharp
});
options.Libraries.Add("CppSharp.CppParser.lib");
if (Abi == CppAbi.Microsoft)
options.MicrosoftMode = true;
if (Triple.Contains("apple"))
SetupMacOptions(options);
@ -111,12 +114,12 @@ namespace CppSharp @@ -111,12 +114,12 @@ namespace CppSharp
public static void Main(string[] args)
{
Console.WriteLine("Generating the C++/CLI parser bindings for Windows...");
ConsoleDriver.Run(new ParserGen(GeneratorKind.CLI, "i686-pc-win32",
ConsoleDriver.Run(new ParserGen(GeneratorKind.CLI, "i686-pc-win32-msvc",
CppAbi.Microsoft));
Console.WriteLine();
Console.WriteLine("Generating the C# parser bindings for Windows...");
ConsoleDriver.Run(new ParserGen(GeneratorKind.CSharp, "i686-pc-win32",
ConsoleDriver.Run(new ParserGen(GeneratorKind.CSharp, "i686-pc-win32-msvc",
CppAbi.Microsoft));
Console.WriteLine();

Loading…
Cancel
Save