[offsets-tool] allow to set targetdir for iOS targets, so it's possible to dump offse...
authorBernhard Urban <bernhard.urban@xamarin.com>
Tue, 4 Jul 2017 09:34:30 +0000 (11:34 +0200)
committerBernhard Urban <bernhard.urban@xamarin.com>
Wed, 5 Jul 2017 10:01:10 +0000 (12:01 +0200)
tools/offsets-tool/MonoAotOffsetsDumper.cs

index 0de260a32377b2e456c9c8b30e65349195ee9a08..0775292a10665800551ee99ffbbc20a515efa8bd 100644 (file)
@@ -337,10 +337,14 @@ namespace CppSharp
                 break;
             case TargetPlatform.WatchOS:
             case TargetPlatform.iOS: {
-                string targetPath = Path.Combine (MaccoreDir, "builds");
-                if (!Directory.Exists (MonoDir))
-                    MonoDir = Path.GetFullPath (Path.Combine (targetPath, "../../mono"));
-                targetBuild = Path.Combine(targetPath, target.Build);
+                if (!string.IsNullOrEmpty (TargetDir)) {
+                    targetBuild = TargetDir;
+                } else {
+                    string targetPath = Path.Combine (MaccoreDir, "builds");
+                    if (!Directory.Exists (MonoDir))
+                        MonoDir = Path.GetFullPath (Path.Combine (targetPath, "../../mono"));
+                    targetBuild = Path.Combine(targetPath, target.Build);
+                }
                 break;
             }
             default: