Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/offsets-tool/MonoAotOffsetsDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static class MonoAotOffsetsDumper
static string AndroidNdkPath = @"";
static string MaccoreDir = @"";
static string TargetDir = @"";
static bool GenIOS;

public enum TargetPlatform
{
Expand Down Expand Up @@ -206,7 +207,7 @@ public static void Main(string[] args)
MaccoreDir = Path.Combine (maccoreDir);
}

if (Directory.Exists(MaccoreDir))
if (Directory.Exists(MaccoreDir) || GenIOS)
SetupiOSTargets();

foreach (var target in Targets)
Expand Down Expand Up @@ -244,6 +245,7 @@ static void BuildParseOptions(Driver driver, Target target)

source.Options.AddDefines ("HAVE_SGEN_GC");
source.Options.AddDefines ("HAVE_MOVING_COLLECTOR");
source.Options.AddDefines("MONO_GENERATING_OFFSETS");
}
}

Expand Down Expand Up @@ -274,6 +276,7 @@ static void ParseCommandLineArgs(string[] args)
{ "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 },
};

Expand Down Expand Up @@ -307,6 +310,7 @@ static void Setup(Driver driver, Target target)
parserOptions.AddArguments("-xc");
parserOptions.AddArguments("-std=gnu99");
parserOptions.AddDefines("CPPSHARP");
parserOptions.AddDefines("MONO_GENERATING_OFFSETS");

foreach (var define in target.Defines)
parserOptions.AddDefines(define);
Expand Down