From c373abe3f7b9dcaee6f8bc67f584833fa5f3d76a Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Mon, 23 Sep 2019 21:05:59 +0200 Subject: [PATCH] [mtouch] include debug check for arm64_32 and reflect error codes in documentation --- docs/website/mtouch-errors.md | 12 ++++++++++++ tools/mtouch/mtouch.cs | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md index 2faa3f52b208..9d0b913dc072 100644 --- a/docs/website/mtouch-errors.md +++ b/docs/website/mtouch-errors.md @@ -966,6 +966,18 @@ This warning is shown if the assemblies names given to the `--interpreter` optio + + +### MT0145: Please use device builds on WatchOS. + +This error occurs if you use combined device builds for a Watch extension project. Per device builds are default in new projects. + + + +### MT0146: ARM64_32 Debug mode requires --interpreter[=all], forcing it. + +This warning is shown when `--interpreter` isn't specified explicitly for ARM64_32 Debug builds. The AOT compiler can't be used because it doesn't support ARM64_32. + # MT1xxx: Project related error messages ### MT10xx: Installer / mtouch diff --git a/tools/mtouch/mtouch.cs b/tools/mtouch/mtouch.cs index 74e8afcabd51..b53ea6463b66 100644 --- a/tools/mtouch/mtouch.cs +++ b/tools/mtouch/mtouch.cs @@ -1353,11 +1353,11 @@ static int Main2 (string[] args) // interpreter can use some extra code (e.g. SRE) that is not shipped in the default (AOT) profile app.EnableRepl = true; } else { - if (app.Platform == ApplePlatform.WatchOS && app.IsArchEnabled (Abi.ARM64_32)) { + if (app.Platform == ApplePlatform.WatchOS && app.IsArchEnabled (Abi.ARM64_32) && app.BitCodeMode != BitCodeMode.LLVMOnly) { if (app.IsArchEnabled (Abi.ARMv7k)) { - throw ErrorHelper.CreateError (99, "Please use device builds on WatchOS."); + throw ErrorHelper.CreateError (145, "Please use device builds on WatchOS."); } else { - ErrorHelper.Warning (99, "ARM64_32 Debug mode requires --interpreter[=all], forcing it."); + ErrorHelper.Warning (146, "ARM64_32 Debug mode requires --interpreter[=all], forcing it."); app.UseInterpreter = true; app.InterpretedAssemblies.Clear (); }