From be22e098baa2861cd70e93b88492e6861802ea10 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Tue, 11 Apr 2017 12:09:03 -0400 Subject: [PATCH 1/6] [mmp] Add support for linking only the platform (Xamarin.Mac.dll) assembly on the full profile Replace https://github.com/xamarin/xamarin-macios/pull/1973 expect that the test parts are still needed. --- Versions-mac.plist.in | 1 + tools/common/Application.cs | 3 +++ tools/linker/MobileMarkStep.cs | 7 +++++-- tools/mmp/Tuning.cs | 29 +++++++++++++++++------------ tools/mmp/driver.cs | 21 ++++++++++++++++++--- 5 files changed, 44 insertions(+), 17 deletions(-) diff --git a/Versions-mac.plist.in b/Versions-mac.plist.in index 42da85a96ea9..606873984284 100644 --- a/Versions-mac.plist.in +++ b/Versions-mac.plist.in @@ -35,6 +35,7 @@ http-client-handlers mono-symbol-archive sgen-concurrent-gc + link-platform diff --git a/tools/common/Application.cs b/tools/common/Application.cs index f6c2217212c2..ef4fdd1a127b 100644 --- a/tools/common/Application.cs +++ b/tools/common/Application.cs @@ -31,6 +31,9 @@ public enum LinkMode { None, SDKOnly, All, +#if !MONOTOUCH + Platform, +#endif } public partial class Application diff --git a/tools/linker/MobileMarkStep.cs b/tools/linker/MobileMarkStep.cs index 1e41495f0f14..b274b10dca8d 100644 --- a/tools/linker/MobileMarkStep.cs +++ b/tools/linker/MobileMarkStep.cs @@ -536,8 +536,11 @@ void ProcessSystemXml (TypeDefinition type) switch (type.Name) { case "XslCompiledTransform": TypeDefinition nop = GetType ("System.Xml", "System.Xml.Xsl.NoOperationDebugger"); - MarkNamedMethod (nop, "OnCompile"); - MarkNamedMethod (nop, "OnExecute"); + // only available on the mobile profile + if (nop != null) { + MarkNamedMethod (nop, "OnCompile"); + MarkNamedMethod (nop, "OnExecute"); + } break; } break; diff --git a/tools/mmp/Tuning.cs b/tools/mmp/Tuning.cs index 92e5410be903..0f1fa4b4bdca 100644 --- a/tools/mmp/Tuning.cs +++ b/tools/mmp/Tuning.cs @@ -73,14 +73,6 @@ class Linker { public static void Process (LinkerOptions options, out LinkContext context, out List assemblies) { - switch (options.TargetFramework.Identifier) { - case "Xamarin.Mac": - Profile.Current = new MacMobileProfile (options.Architecture == "x86_64" ? 64 : 32); - break; - default: - Profile.Current = new MonoMacProfile (); - break; - } Namespaces.Initialize (); var pipeline = CreatePipeline (options); @@ -89,6 +81,7 @@ public static void Process (LinkerOptions options, out LinkContext context, out context = CreateLinkContext (options, pipeline); context.Resolver.AddSearchDirectory (options.OutputDirectory); + context.KeepTypeForwarderOnlyAssemblies = (Profile.Current is XamarinMacProfile); try { pipeline.Process (context); @@ -163,15 +156,19 @@ static Pipeline CreatePipeline (LinkerOptions options) if (options.LinkMode != LinkMode.None) { pipeline.AppendStep (new TypeMapStep ()); - pipeline.AppendStep (new SubStepDispatcher { + var subdispatcher = new SubStepDispatcher { new ApplyPreserveAttribute (), - new CoreRemoveSecurity (), new OptimizeGeneratedCodeSubStep (options.EnsureUIThread), new RemoveUserResourcesSubStep (), new CoreRemoveAttributes (), new CoreHttpMessageHandler (options), new MarkNSObjects (), - }); + }; + // CoreRemoveSecurity can modify non-linked assemblies + // but the conditions for this cannot happen if only the platform assembly is linked + if (options.LinkMode != LinkMode.Platform) + subdispatcher.Add (new CoreRemoveSecurity ()); + pipeline.AppendStep (subdispatcher); pipeline.AppendStep (new MonoMacPreserveCode (options)); pipeline.AppendStep (new PreserveCrypto ()); @@ -251,12 +248,20 @@ protected override bool IsLinked (AssemblyDefinition assembly) if (link_mode == LinkMode.None) return false; + if (link_mode == LinkMode.Platform) + return Profile.IsProductAssembly (assembly); + return base.IsLinked (assembly); } protected override void ProcessAssembly (AssemblyDefinition assembly) { - if (link_mode == LinkMode.None) { + switch (link_mode) { + case LinkMode.Platform: + if (!Profile.IsProductAssembly (assembly)) + Annotations.SetAction (assembly, AssemblyAction.Copy); + break; + case LinkMode.None: Annotations.SetAction (assembly, AssemblyAction.Copy); return; } diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index a657e9eb86a3..6b48975817de 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -274,6 +274,7 @@ static void Main2 (string [] args) } } }, + { "linkplatform", "Link only the Xamarin.Mac.dll platform assembly", v => App.LinkMode = LinkMode.Platform }, { "linksdkonly", "Link only the SDK assemblies", v => App.LinkMode = LinkMode.SDKOnly }, { "linkskip=", "Skip linking of the specified assembly", v => App.LinkSkipped.Add (v) }, { "i18n=", "List of i18n assemblies to copy to the output directory, separated by commas (none,all,cjk,mideast,other,rare,west)", v => App.I18n = LinkerOptions.ParseI18nAssemblies (v) }, @@ -468,9 +469,16 @@ static void Main2 (string [] args) if (IsUnified == IsClassic || (IsUnified && IsUnifiedCount != 1)) throw new Exception ("IsClassic/IsUnified/IsUnifiedMobile/IsUnifiedFullSystemFramework/IsUnifiedFullXamMacFramework logic regression"); - if ((IsUnifiedFullSystemFramework || IsUnifiedFullXamMacFramework) && (App.LinkMode != LinkMode.None)) - throw new MonoMacException (2007, true, - "Xamarin.Mac Unified API against a full .NET framework does not support linking. Pass the -nolink flag."); + if (IsUnifiedFullSystemFramework || IsUnifiedFullXamMacFramework) { + switch (App.LinkMode) { + case LinkMode.None: + case LinkMode.Platform: + break; + default: + throw new MonoMacException (2007, true, + "Xamarin.Mac Unified API against a full .NET framework does not support linking SDK or All assemblies. Pass either the `-nolink` or `-linkplatform` flag."); + } + } if (App.LinkMode != LinkMode.None && is_extension) { App.LinkMode = LinkMode.None; @@ -695,6 +703,13 @@ static void Pack (IList unprocessed) if (!File.Exists (root_assembly)) throw new MonoMacException (7, true, "The root assembly '{0}' does not exist", root_assembly); + if (IsClassic) + Profile.Current = new MonoMacProfile (); + else if (IsUnifiedFullXamMacFramework || IsUnifiedFullSystemFramework) + Profile.Current = new XamarinMacProfile (arch == "x86_64" ? 64 : 32); + else + Profile.Current = new MacMobileProfile (arch == "x86_64" ? 64 : 32); + string root_wo_ext = Path.GetFileNameWithoutExtension (root_assembly); if (Profile.IsSdkAssembly (root_wo_ext) || Profile.IsProductAssembly (root_wo_ext)) throw new MonoMacException (3, true, "Application name '{0}.exe' conflicts with an SDK or product assembly (.dll) name.", root_wo_ext); From 4a1e17025935e51da8f0a9e32941c439c4d7e755 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Thu, 6 Apr 2017 14:18:50 -0500 Subject: [PATCH 2/6] Add XM SDK + LinkSkip test --- tests/mmptest/mmptest.csproj | 1 + tests/mmptest/src/LinkerTests.cs | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/mmptest/src/LinkerTests.cs diff --git a/tests/mmptest/mmptest.csproj b/tests/mmptest/mmptest.csproj index c67064af9527..19c1da454521 100644 --- a/tests/mmptest/mmptest.csproj +++ b/tests/mmptest/mmptest.csproj @@ -96,6 +96,7 @@ unit\aot.cs + diff --git a/tests/mmptest/src/LinkerTests.cs b/tests/mmptest/src/LinkerTests.cs new file mode 100644 index 000000000000..b52dadb5f2bb --- /dev/null +++ b/tests/mmptest/src/LinkerTests.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using NUnit.Framework; +using System.Reflection; + +namespace Xamarin.MMP.Tests +{ + public partial class MMPTests + { + int GetNumberOfTypesInLibrary (string path) + { + string output = TI.RunAndAssert ("/Library/Frameworks/Mono.framework/Versions/Current/Commands/monop", new StringBuilder ("-r:" + path), "GetNumberOfTypesInLibrary"); + string[] splitBuildOutput = output.Split (new string[] { Environment.NewLine }, StringSplitOptions.None); + string outputLine = splitBuildOutput.First (x => x.StartsWith ("Total:")); + string numberSize = outputLine.Split (':')[1]; + string number = numberSize.Split (' ')[1]; + return int.Parse (number); + } + + [Test] + public void UnifiedLinkingSDK_WithAllNonProductSkipped_Builds () + { + RunMMPTest (tmpDir => { + string[] dependencies = { "mscorlib", "System.Core", "System" }; + string config = "SdkOnly--linkskip=" + dependencies.Aggregate ((arg1, arg2) => arg1 + " --linkskip=" + arg2) + ""; + TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = config }; + TI.TestUnifiedExecutable (test); + foreach (string dep in dependencies) { + string outputDep = Path.Combine (tmpDir, "bin/Debug/UnifiedExample.app/Contents/MonoBundle", dep + ".dll"); + string baseDep = Path.Combine (TI.FindRootDirectory (), "Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/", dep + ".dll"); + + Assert.AreEqual (GetNumberOfTypesInLibrary (baseDep), GetNumberOfTypesInLibrary (outputDep), "We linked a linkskip - " + dep + " with config:\n" + config); + } + }); + } + } +} From 895079b0bdc08462fcfd83379d586692b339bc68 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 11 Apr 2017 16:55:19 -0500 Subject: [PATCH 3/6] [macos] Add platform linking support to msbuild --- msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs b/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs index 1c294218c05a..c9d12bf35248 100644 --- a/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs +++ b/msbuild/Xamarin.Mac.Tasks.Core/Tasks/MmpTaskBase.cs @@ -166,6 +166,9 @@ protected override string GenerateCommandLineCommands () case "sdkonly": args.Add ("/linksdkonly"); break; + case "platform": + args.Add ("/linkplatform"); + break; default: args.Add ("/nolink"); break; From f9c98290f8c7ace3adc5a15215eacd16181c3b84 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 11 Apr 2017 16:56:25 -0500 Subject: [PATCH 4/6] [macos] Add full SDK test --- tests/mmptest/src/LinkerTests.cs | 35 ++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/tests/mmptest/src/LinkerTests.cs b/tests/mmptest/src/LinkerTests.cs index b52dadb5f2bb..389845f1958d 100644 --- a/tests/mmptest/src/LinkerTests.cs +++ b/tests/mmptest/src/LinkerTests.cs @@ -21,8 +21,15 @@ int GetNumberOfTypesInLibrary (string path) return int.Parse (number); } + string GetAppName (bool modern) => modern ? "UnifiedExample.app" : "XM45Example.app"; + string GetOutputBundlePath (string tmpDir, string name, bool modern) => Path.Combine (tmpDir, "bin/Debug/" + GetAppName (modern) + "/Contents/MonoBundle", name + ".dll"); + + string GetFrameworkName (bool modern) => modern ? "Xamarin.Mac" : "4.5"; + string GetBaseAssemblyPath (string name, bool modern) => Path.Combine (TI.FindRootDirectory (), "Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/" + GetFrameworkName (modern) + "/", name + ".dll"); + + [Test] - public void UnifiedLinkingSDK_WithAllNonProductSkipped_Builds () + public void ModernLinkingSDK_WithAllNonProductSkipped_BuildsWithSameNumberOfTypes () { RunMMPTest (tmpDir => { string[] dependencies = { "mscorlib", "System.Core", "System" }; @@ -30,11 +37,31 @@ public void UnifiedLinkingSDK_WithAllNonProductSkipped_Builds () TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = config }; TI.TestUnifiedExecutable (test); foreach (string dep in dependencies) { - string outputDep = Path.Combine (tmpDir, "bin/Debug/UnifiedExample.app/Contents/MonoBundle", dep + ".dll"); - string baseDep = Path.Combine (TI.FindRootDirectory (), "Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/", dep + ".dll"); + int typesInBaseLib = GetNumberOfTypesInLibrary (GetBaseAssemblyPath (dep, true)); + int typesInOutput = GetNumberOfTypesInLibrary (GetOutputBundlePath (tmpDir, dep, true)); + Assert.AreEqual (typesInBaseLib, typesInOutput, $"We linked a linkskip - {dep} with config ({typesInBaseLib} vs {typesInOutput}:\n {config}"); + } + }); + } - Assert.AreEqual (GetNumberOfTypesInLibrary (baseDep), GetNumberOfTypesInLibrary (outputDep), "We linked a linkskip - " + dep + " with config:\n" + config); + [Test] + public void FullLinkingSdk_BuildsWithFewerPlatformTypesOnly () + { + RunMMPTest (tmpDir => { + string[] nonPlatformDependencies = { "mscorlib", "System.Core", "System" }; + string config = "Platform"; + TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = config, XM45 = true }; + TI.TestUnifiedExecutable (test); + foreach (string dep in nonPlatformDependencies) { + int typesInBaseLib = GetNumberOfTypesInLibrary (GetBaseAssemblyPath (dep, false)); + int typesInOutput = GetNumberOfTypesInLibrary (GetOutputBundlePath (tmpDir, dep, false)); + Assert.AreEqual (typesInBaseLib, typesInOutput, $"We linked a linkskip - {dep} with config ({typesInBaseLib} vs {typesInOutput}):\n {config}"); } + + int typesInBasePlatform = GetNumberOfTypesInLibrary (GetBaseAssemblyPath ("Xamarin.Mac", false)); + int typesInOutputPlatform = GetNumberOfTypesInLibrary (GetOutputBundlePath (tmpDir, "Xamarin.Mac", false)); + Assert.AreNotEqual (typesInBasePlatform, typesInOutputPlatform, $"We linked a linkskip - Xamarin.Mac with config ({typesInBasePlatform} vs {typesInOutputPlatform}):\n {config}"); + }); } } From acdbe743d7bf7ef5ce1e4892c3d725d875b61b6a Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Mon, 17 Apr 2017 11:46:14 -0500 Subject: [PATCH 5/6] [macios] Diable classic from using linkplatform - Extended test infrastructure change to allow classic projects that include bundling - Setting linkplatform in MonoBundlingExtraArgs since we don't even read project setting LinkMode - Platform for classic --- tests/common/mac/ClassicExample.csproj | 2 +- tests/common/mac/ProjectTestHelpers.cs | 8 ++++---- tests/mmptest/src/LinkerTests.cs | 16 ++++++++++++---- tools/mmp/driver.cs | 3 +++ tools/mmp/error.cs | 1 + tools/mtouch/error.cs | 1 + 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/tests/common/mac/ClassicExample.csproj b/tests/common/mac/ClassicExample.csproj index 3d304c4b3ccc..a41160ce021b 100644 --- a/tests/common/mac/ClassicExample.csproj +++ b/tests/common/mac/ClassicExample.csproj @@ -21,7 +21,7 @@ false false false - false + %INCLUDE_MONO_RUNTIME% false Mac Developer false diff --git a/tests/common/mac/ProjectTestHelpers.cs b/tests/common/mac/ProjectTestHelpers.cs index b9f07ba244ba..1dcb198e31e3 100644 --- a/tests/common/mac/ProjectTestHelpers.cs +++ b/tests/common/mac/ProjectTestHelpers.cs @@ -237,10 +237,10 @@ public static OutputText TestUnifiedExecutable (UnifiedTestConfig config, bool s return new OutputText (buildOutput, runOutput); } - public static OutputText TestClassicExecutable (string tmpDir, string testCode = "", string csprojConfig = "", bool shouldFail = false) + public static OutputText TestClassicExecutable (string tmpDir, string testCode = "", string csprojConfig = "", bool shouldFail = false, bool includeMonoRuntime = false) { Guid guid = Guid.NewGuid (); - string csprojTarget = GenerateClassicEXEProject (tmpDir, "ClassicExample.csproj", testCode + GenerateOuputCommand (tmpDir,guid), csprojConfig, ""); + string csprojTarget = GenerateClassicEXEProject (tmpDir, "ClassicExample.csproj", testCode + GenerateOuputCommand (tmpDir,guid), csprojConfig, includeMonoRuntime: includeMonoRuntime); string buildOutput = BuildProject (csprojTarget, isUnified : false, diagnosticMSBuild: false, shouldFail : shouldFail); if (shouldFail) return new OutputText (buildOutput, ""); @@ -267,7 +267,7 @@ public static OutputText TestSystemMonoExecutable (UnifiedTestConfig config, boo return new OutputText (buildOutput, runOutput); } - public static string GenerateClassicEXEProject (string tmpDir, string projectName, string testCode, string csprojConfig = "", string references = "", string assemblyName = null) + public static string GenerateClassicEXEProject (string tmpDir, string projectName, string testCode, string csprojConfig = "", string references = "", string assemblyName = null, bool includeMonoRuntime = false) { WriteMainFile ("", testCode, false, false, Path.Combine (tmpDir, "Main.cs")); @@ -276,7 +276,7 @@ public static string GenerateClassicEXEProject (string tmpDir, string projectNam return CopyFileWithSubstitutions (Path.Combine (sourceDir, projectName), Path.Combine (tmpDir, projectName), text => { - return text.Replace ("%CODE%", csprojConfig).Replace ("%REFERENCES%", references).Replace ("%NAME%", assemblyName ?? Path.GetFileNameWithoutExtension (projectName)); + return text.Replace ("%CODE%", csprojConfig).Replace ("%REFERENCES%", references).Replace ("%NAME%", assemblyName ?? Path.GetFileNameWithoutExtension (projectName)).Replace ("%INCLUDE_MONO_RUNTIME%", includeMonoRuntime.ToString ()); }); } diff --git a/tests/mmptest/src/LinkerTests.cs b/tests/mmptest/src/LinkerTests.cs index 389845f1958d..6863de6a501c 100644 --- a/tests/mmptest/src/LinkerTests.cs +++ b/tests/mmptest/src/LinkerTests.cs @@ -27,6 +27,7 @@ int GetNumberOfTypesInLibrary (string path) string GetFrameworkName (bool modern) => modern ? "Xamarin.Mac" : "4.5"; string GetBaseAssemblyPath (string name, bool modern) => Path.Combine (TI.FindRootDirectory (), "Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/" + GetFrameworkName (modern) + "/", name + ".dll"); + const string PlatformProjectConfig = "Platform"; [Test] public void ModernLinkingSDK_WithAllNonProductSkipped_BuildsWithSameNumberOfTypes () @@ -49,20 +50,27 @@ public void FullLinkingSdk_BuildsWithFewerPlatformTypesOnly () { RunMMPTest (tmpDir => { string[] nonPlatformDependencies = { "mscorlib", "System.Core", "System" }; - string config = "Platform"; - TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = config, XM45 = true }; + TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) { CSProjConfig = PlatformProjectConfig, XM45 = true }; TI.TestUnifiedExecutable (test); foreach (string dep in nonPlatformDependencies) { int typesInBaseLib = GetNumberOfTypesInLibrary (GetBaseAssemblyPath (dep, false)); int typesInOutput = GetNumberOfTypesInLibrary (GetOutputBundlePath (tmpDir, dep, false)); - Assert.AreEqual (typesInBaseLib, typesInOutput, $"We linked a linkskip - {dep} with config ({typesInBaseLib} vs {typesInOutput}):\n {config}"); + Assert.AreEqual (typesInBaseLib, typesInOutput, $"We linked a linkskip - {dep} with config ({typesInBaseLib} vs {typesInOutput}):\n {PlatformProjectConfig}"); } int typesInBasePlatform = GetNumberOfTypesInLibrary (GetBaseAssemblyPath ("Xamarin.Mac", false)); int typesInOutputPlatform = GetNumberOfTypesInLibrary (GetOutputBundlePath (tmpDir, "Xamarin.Mac", false)); - Assert.AreNotEqual (typesInBasePlatform, typesInOutputPlatform, $"We linked a linkskip - Xamarin.Mac with config ({typesInBasePlatform} vs {typesInOutputPlatform}):\n {config}"); + Assert.AreNotEqual (typesInBasePlatform, typesInOutputPlatform, $"We linked a linkskip - Xamarin.Mac with config ({typesInBasePlatform} vs {typesInOutputPlatform}):\n {PlatformProjectConfig}"); }); } + + [Test] + public void PlatformSDKOnClassic_ShouldNotBeSupported () + { + RunMMPTest (tmpDir => { + TI.TestClassicExecutable (tmpDir, csprojConfig: "--linkplatform\n", includeMonoRuntime:true, shouldFail: true); + }); + } } } diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index 6b48975817de..5484d1f75cb8 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -454,6 +454,9 @@ static void Main2 (string [] args) if (targetFramework == TargetFramework.Empty) throw new MonoMacException (1404, true, "Target framework '{0}' is invalid.", userTargetFramework); + if (IsClassic && App.LinkMode == LinkMode.Platform) + throw new MonoMacException (2100, true, "Xamarin.Mac Classic API does not support Platofmr Linking."); + // sanity check as this should never happen: we start out by not setting any // Unified/Classic properties, and only IsUnifiedMobile if we are are on the // XM framework. If we are not, we set IsUnifiedFull to true iff we detect diff --git a/tools/mmp/error.cs b/tools/mmp/error.cs index 2da98d93d79a..bbdeaa015673 100644 --- a/tools/mmp/error.cs +++ b/tools/mmp/error.cs @@ -73,6 +73,7 @@ namespace Xamarin.Bundler { // Warning MM2016 Invalid TlsProvider `{0}` option. The only valid value `{1}` will be used. // MM2017 Could not process XML description: {0} // MM202x Binding Optimizer failed processing `...`. + // MM2100 Xamarin.Mac Classic API does not support Platofmr Linking. // MT3xxx AOT // MT30xx AOT (general) errors // MT3001 Could not AOT the assembly '{0}' diff --git a/tools/mtouch/error.cs b/tools/mtouch/error.cs index b905cf3e5210..e5639a53dc5d 100644 --- a/tools/mtouch/error.cs +++ b/tools/mtouch/error.cs @@ -251,6 +251,7 @@ namespace Xamarin.Bundler { // MT207x Metadata Reducer failed processing `...`. // MT208x MarkNSObjects failed processing `...`. // MT209x Inliner failed processing `...`. + // MT2100 ** reserved Xamarin.Mac ** // MT3xxx AOT // MT30xx AOT (general) errors // MT3001 Could not AOT the assembly '{0}' From 5b8d400016f90a4dbfa28ce5384de5e5ea30643f Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 16 May 2017 10:25:51 -0500 Subject: [PATCH 6/6] Fix build --- tests/common/mac/ProjectTestHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/mac/ProjectTestHelpers.cs b/tests/common/mac/ProjectTestHelpers.cs index 9e6c566109b6..bae624ad90cb 100644 --- a/tests/common/mac/ProjectTestHelpers.cs +++ b/tests/common/mac/ProjectTestHelpers.cs @@ -240,7 +240,7 @@ public static OutputText TestUnifiedExecutable (UnifiedTestConfig config, bool s public static OutputText TestClassicExecutable (string tmpDir, string testCode = "", string csprojConfig = "", bool shouldFail = false, bool includeMonoRuntime = false) { Guid guid = Guid.NewGuid (); - string csprojTarget = GenerateClassicEXEProject (tmpDir, "ClassicExample.csproj", testCode + GenerateOuputCommand (tmpDir,guid), csprojConfig, includeMonoRuntime: includeMonoRuntime); + string csprojTarget = GenerateClassicEXEProject (tmpDir, "ClassicExample.csproj", testCode + GenerateOutputCommand (tmpDir,guid), csprojConfig, includeMonoRuntime: includeMonoRuntime); string buildOutput = BuildProject (csprojTarget, isUnified : false, diagnosticMSBuild: false, shouldFail : shouldFail); if (shouldFail) return new OutputText (buildOutput, "");