From 48b6c59af384c698be779df68721a929e73b7573 Mon Sep 17 00:00:00 2001 From: Andi McClure Date: Thu, 16 Mar 2017 19:16:53 -0400 Subject: [PATCH 1/6] Update mono to 2017-02 "monthly master" branch and fix a build script for compatibility --- build-tools/mono-runtimes/mono-runtimes.targets | 3 ++- external/mono | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-tools/mono-runtimes/mono-runtimes.targets b/build-tools/mono-runtimes/mono-runtimes.targets index 48a3e38134c..7e532e75c80 100644 --- a/build-tools/mono-runtimes/mono-runtimes.targets +++ b/build-tools/mono-runtimes/mono-runtimes.targets @@ -8,7 +8,8 @@ - + + diff --git a/external/mono b/external/mono index dd8ecf3a1dc..6caddcd9d1a 160000 --- a/external/mono +++ b/external/mono @@ -1 +1 @@ -Subproject commit dd8ecf3a1dc09e88fd5c82dddf56d14a2aff65d9 +Subproject commit 6caddcd9d1a5ce007b33af8783d20cbe7e15c020 From 6e9a6612e1f71fd9e21e9349a11dfb86663714c9 Mon Sep 17 00:00:00 2001 From: Andi McClure Date: Thu, 16 Mar 2017 19:16:53 -0400 Subject: [PATCH 2/6] Correct "Exists" logic on monodoc debug files The previous commit's attempts to copy the pdb/mdb files for monodoc had a problem where they would be evaluated too early (probably before the files existed) and in the wrong directory. To address this, the files are instead specified as a MonoDocCopyItemOptional, a new target _GetMonodocItems is created and the ItemGroups for _MonoDocCopyItems/_MonoDocInstalledItems are evaluated in this target with correct Exists logic for the Optional files. Additional DependsOnTargets attributes were distributed through the file to ensure this new target is evaluated at the correct time. --- .../mono-runtimes/mono-runtimes.targets | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/build-tools/mono-runtimes/mono-runtimes.targets b/build-tools/mono-runtimes/mono-runtimes.targets index 7e532e75c80..735ed7558c4 100644 --- a/build-tools/mono-runtimes/mono-runtimes.targets +++ b/build-tools/mono-runtimes/mono-runtimes.targets @@ -8,8 +8,8 @@ - - + + @@ -26,13 +26,6 @@ <_MonoProfileDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid <_MonoOutputDir>$(MonoSourceFullPath)\mcs\class\lib\net_4_x - - <_MonoDocCopyItems Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')" /> - - - <_MonoDocInstalledItems Include="@(MonoDocCopyItem->'$(_MandroidDir)\%(Identity)')" /> - <_MonoDocInstalledItems Include="$(_MandroidDir)\mdoc.exe" /> - _BuildLlvm; @@ -148,7 +141,7 @@ /> @@ -232,7 +225,7 @@ + + + <_MonoDocCopyItems Include="@(MonoDocCopyItem->'$(_MonoOutputDir)\%(Identity)')" /> + <_MonoDocCopyItems + Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') " + Include="@(MonoDocCopyItemOptional->'$(_MonoOutputDir)\%(Identity)')" + /> + + <_MonoDocInstalledItems Include="@(MonoDocCopyItem->'$(_MandroidDir)\%(Identity)')" /> + <_MonoDocInstalledItems + Condition=" Exists ('$(_MonoOutputDir)\%(Identity)') " + Include="@(MonoDocCopyItemOptional->'$(_MandroidDir)\%(Identity)')" + /> + <_MonoDocInstalledItems Include="$(_MandroidDir)\mdoc.exe" /> + + + Outputs="@(_MonoDocInstalledItems)" + DependsOnTargets="_GetMonodocItems"> + DependsOnTargets="_GetRuntimesOutputItems;_GetMonodocItems;_PrepareLlvmItems"> From 948ae3b007ef97919e1cfa84387a6212bf14c8a5 Mon Sep 17 00:00:00 2001 From: Andi McClure Date: Thu, 16 Mar 2017 19:16:53 -0400 Subject: [PATCH 3/6] Bump mono, linker, Java.interop/cecil, and provisioned MDK package. --- .gitmodules | 2 +- build-tools/dependencies/dependencies.projitems | 8 ++++---- external/linker | 2 +- external/mono | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitmodules b/.gitmodules index ec9873a0ffd..e7be856691f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,7 +5,7 @@ [submodule "external/mono"] path = external/mono url = https://github.com/mono/mono.git - branch = mono-4.8.0-branch + branch = 2017-02 [submodule "external/mxe"] path = external/mxe url = https://github.com/xamarin/mxe.git diff --git a/build-tools/dependencies/dependencies.projitems b/build-tools/dependencies/dependencies.projitems index 8ab2f36f5c5..c49c56e5284 100644 --- a/build-tools/dependencies/dependencies.projitems +++ b/build-tools/dependencies/dependencies.projitems @@ -1,7 +1,7 @@ - <_DarwinMonoFramework>MonoFramework-MDK-4.8.0.489.macos10.xamarin.universal.pkg + <_DarwinMonoFramework>MonoFramework-MDK-4.9.3.6.macos10.xamarin.universal.pkg <_AptGetInstall>apt-get -f -u install @@ -57,10 +57,10 @@ $(_AptGetInstall) vim-common - 4.4.0 - 4.8.99 + 4.9.3 + 4.9.99 $(MSBuildThisFileDirectory)..\scripts\mono-version - https://bosstoragemirror.blob.core.windows.net/wrench/mono-4.8.0/9a/9ac5bf2f0235ab75d2cc6be0866d6ca3ed302977/$(_DarwinMonoFramework) + https://bosstoragemirror.blob.core.windows.net/wrench/mono-2017-02/c5/c52c4bd713e19339a5859e73a99dbb4cc21c6d3f/$(_DarwinMonoFramework) installer -pkg "$(AndroidToolchainCacheDirectory)\$(_DarwinMonoFramework)" -target / diff --git a/external/linker b/external/linker index d57b8dd62dc..dfea33750a2 160000 --- a/external/linker +++ b/external/linker @@ -1 +1 @@ -Subproject commit d57b8dd62dc794b8b946c03266e7238930f6a8c6 +Subproject commit dfea33750a23387a3deb909954b8e25b0b4e20a3 diff --git a/external/mono b/external/mono index 6caddcd9d1a..c52c4bd713e 160000 --- a/external/mono +++ b/external/mono @@ -1 +1 @@ -Subproject commit 6caddcd9d1a5ce007b33af8783d20cbe7e15c020 +Subproject commit c52c4bd713e19339a5859e73a99dbb4cc21c6d3f From f7b6dfabca215e49a105c2157ddd2a13cd5eb035 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Thu, 16 Mar 2017 19:16:53 -0400 Subject: [PATCH 4/6] [Xamarin.Android.Build.Tests] Fix two pdb related msbuild tests. We are now producing .pdb files for the main assemblies in the app. So we should not be looking for .dll.mdb files in the apk for those files. This commit fixes the tests to look for .pdb files. --- .../Tests/Xamarin.Android.Build.Tests/BuildTest.cs | 4 ++-- .../Tests/Xamarin.Android.Build.Tests/PackagingTest.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs index c5782bbf22c..a86d63ac458 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs @@ -135,8 +135,8 @@ public void BuildBasicApplicationCheckPdb () File.Exists (pdbToMdbPath), "PdbTestLibrary.dll.mdb must be generated next to the .pdb"); Assert.IsTrue ( - File.Exists (Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "android", "assets", "UnnamedProject.dll.mdb")), - "UnnamedProject.dll.mdb must be copied to the Intermediate directory"); + File.Exists (Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "android", "assets", "UnnamedProject.pdb")), + "UnnamedProject.pdb must be copied to the Intermediate directory"); Assert.IsFalse ( File.Exists (Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "android", "assets", "PdbTestLibrary.pdb")), "PdbTestLibrary.pdb must not be copied to Intermediate directory"); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs index 4857abe0d43..74cdee2e8b4 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs @@ -63,7 +63,7 @@ public void CheckBuildIdIsUnique () var allFilesInArchive = Directory.GetFiles (archivePath, "*", SearchOption.AllDirectories); Assert.IsTrue (allFilesInArchive.Any (x => Path.GetFileName (x) == string.Format ("{0}.dll", proj.ProjectName)), "{0}.dll should exist in {1}", proj.ProjectName, archivePath); - Assert.IsTrue (allFilesInArchive.Any (x => Path.GetFileName (x) == string.Format ("{0}.dll.mdb", proj.ProjectName)), "{0}.mdb should exist in {1}", + Assert.IsTrue (allFilesInArchive.Any (x => Path.GetFileName (x) == string.Format ("{0}.pdb", proj.ProjectName)), "{0}.pdb should exist in {1}", proj.ProjectName, archivePath); foreach (var abi in new string [] { "armeabi-v7a", "x86" }) { using (var apk = ZipHelper.OpenZip (Path.Combine (outputPath, proj.PackageName + "-" + abi + ".apk"))) { From b79abdd34e1d4c80fd224d21c6a01b6a21466041 Mon Sep 17 00:00:00 2001 From: Andi McClure Date: Thu, 16 Mar 2017 19:16:53 -0400 Subject: [PATCH 5/6] Bump mono to include offsets-tool patch and alter offsets-tool invocation to use it. Fixes a problem where previously-hardcoded directory paths were breaking monodroid build. --- build-tools/mono-runtimes/mono-runtimes.projitems | 8 ++++++++ build-tools/mono-runtimes/mono-runtimes.targets | 2 +- external/mono | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build-tools/mono-runtimes/mono-runtimes.projitems b/build-tools/mono-runtimes/mono-runtimes.projitems index 306b1e2121a..f74e013c95b 100644 --- a/build-tools/mono-runtimes/mono-runtimes.projitems +++ b/build-tools/mono-runtimes/mono-runtimes.projitems @@ -277,6 +277,7 @@ <_MonoCrossRuntime Include="cross-arm" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':armeabi:'))"> + armeabi ar as $(HostCc) @@ -299,6 +300,7 @@ <_MonoCrossRuntime Include="cross-arm64" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':arm64:'))"> + arm64-v8a ar as $(HostCc) @@ -321,6 +323,7 @@ <_MonoCrossRuntime Include="cross-x86" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':x86:'))"> + x86 ar as $(HostCc32) @@ -343,6 +346,7 @@ <_MonoCrossRuntime Include="cross-x86_64" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':x86_64:'))"> + x86_64 ar as $(HostCc) @@ -365,6 +369,7 @@ <_MonoCrossRuntime Include="cross-arm-win" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-armeabi:'))"> + armeabi $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-ar $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-as $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-gcc @@ -387,6 +392,7 @@ <_MonoCrossRuntime Include="cross-arm64-win" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-arm64:'))"> + arm64-v8a $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-ar $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-as $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-gcc @@ -409,6 +415,7 @@ <_MonoCrossRuntime Include="cross-x86-win" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86:'))"> + x86 $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-ar $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-as $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix32)-gcc @@ -431,6 +438,7 @@ <_MonoCrossRuntime Include="cross-x86_64-win" Condition="$(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86_64:'))"> + x86_64 $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix64)-ar $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix64)-as $(AndroidMxeFullPath)\bin\$(MingwCommandPrefix64)-gcc diff --git a/build-tools/mono-runtimes/mono-runtimes.targets b/build-tools/mono-runtimes/mono-runtimes.targets index 735ed7558c4..6edc3c7dd1e 100644 --- a/build-tools/mono-runtimes/mono-runtimes.targets +++ b/build-tools/mono-runtimes/mono-runtimes.targets @@ -453,7 +453,7 @@ <_CppAbiDir Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">linux_64 Date: Thu, 16 Mar 2017 19:19:36 -0400 Subject: [PATCH 6/6] Bump mono for build fixes --- external/mono | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/mono b/external/mono index 785c82b5d12..24e82a53858 160000 --- a/external/mono +++ b/external/mono @@ -1 +1 @@ -Subproject commit 785c82b5d1275b94d20471694ba5598c2bad1b5b +Subproject commit 24e82a538588116cbd490eac44ff98fc9f4a9817