X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=tools%2Foffsets-tool%2FMonoAotOffsetsDumper.cs;fp=tools%2Foffsets-tool%2FMonoAotOffsetsDumper.cs;h=94622793145f8d5ff85b0a5918b04cc3797ef81a;hb=b705b1c2aa24a1f674a03483a4f660e9662a4d6d;hp=0775292a10665800551ee99ffbbc20a515efa8bd;hpb=d7a98342188f0479c529f1d3d22cc5a6c37c9ada;p=mono.git diff --git a/tools/offsets-tool/MonoAotOffsetsDumper.cs b/tools/offsets-tool/MonoAotOffsetsDumper.cs index 0775292a106..94622793145 100644 --- a/tools/offsets-tool/MonoAotOffsetsDumper.cs +++ b/tools/offsets-tool/MonoAotOffsetsDumper.cs @@ -28,6 +28,7 @@ namespace CppSharp static string AndroidNdkPath = @""; static string MaccoreDir = @""; static string TargetDir = @""; + static bool GenIOS; public enum TargetPlatform { @@ -206,7 +207,7 @@ namespace CppSharp MaccoreDir = Path.Combine (maccoreDir); } - if (Directory.Exists(MaccoreDir)) + if (Directory.Exists(MaccoreDir) || GenIOS) SetupiOSTargets(); foreach (var target in Targets) @@ -244,6 +245,7 @@ namespace CppSharp source.Options.AddDefines ("HAVE_SGEN_GC"); source.Options.AddDefines ("HAVE_MOVING_COLLECTOR"); + source.Options.AddDefines("MONO_GENERATING_OFFSETS"); } } @@ -274,6 +276,7 @@ namespace CppSharp { "android-ndk=", "Path to Android NDK", v => AndroidNdkPath = v }, { "targetdir=", "Path to the directory containing the mono build", v =>TargetDir = v }, { "mono=", "include directory", v => MonoDir = v }, + { "gen-ios", "generate iOS offsets", v => GenIOS != null }, { "h|help", "show this message and exit", v => showHelp = v != null }, }; @@ -307,6 +310,7 @@ namespace CppSharp parserOptions.AddArguments("-xc"); parserOptions.AddArguments("-std=gnu99"); parserOptions.AddDefines("CPPSHARP"); + parserOptions.AddDefines("MONO_GENERATING_OFFSETS"); foreach (var define in target.Defines) parserOptions.AddDefines(define);