diff --git a/.gitmodules b/.gitmodules
index 1751d129dcc..9a8c4526fd5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,7 +5,7 @@
[submodule "external/mono"]
path = external/mono
url = https://github.com/mono/mono.git
- branch = 2017-06
+ branch = 2017-10
[submodule "external/mxe"]
path = external/mxe
url = https://github.com/xamarin/mxe.git
diff --git a/Configuration.props b/Configuration.props
index 7144d603252..c55e9a17e40 100644
--- a/Configuration.props
+++ b/Configuration.props
@@ -54,10 +54,10 @@
$(MSBuildThisFileDirectory)external\Java.Interop
$(MSBuildThisFileDirectory)external\llvm
$(MSBuildThisFileDirectory)external\mono
- 5.4.0
- 5.6.0
+ 5.8.0
+ 5.9.0
True
- $(MonoRequiredMinimumVersion).147
+ $(MonoRequiredMinimumVersion).22
$(MSBuildThisFileDirectory)external\linker
$(MSBuildThisFileDirectory)external\opentk
$(MSBuildThisFileDirectory)external\libzip
diff --git a/README.md b/README.md
index eba65c505a8..ceabd5fe2d3 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ Xamarin.Android provides open-source bindings of the Android SDK for use with
Building Xamarin.Android requires:
-* [Mono 4.4 or later](#mono-sdk)
+* [Latest Mono](#mono-sdk)
* [The Java Development Kit (JDK)](#jdk)
* [Autotools (`autoconf`, `automake`, etc.)](#autotools)
* [The Android SDK and NDK](#ndk)
@@ -70,10 +70,8 @@ to provide install instructions to obtain the missing dependency, e.g.:
## Mono MDK
-Mono 4.4 or later is required to build on [OS X][osx-mono] and Linux.
-
-(This is because the build system uses the [XmlPeek][xmlpeek] task, which
-was first added in Mono 4.4.)
+Latest Mono is required to build on [OS X][osx-mono] and Linux.
+The build will tell you if your version is outdated.
[osx-mono]: http://www.mono-project.com/download/#download-mac
[xmlpeek]: https://msdn.microsoft.com/en-us/library/ff598684.aspx
@@ -210,8 +208,7 @@ Overridable MSBuild properties include:
supported in order to allow a build to continue. Policy is to require a
system mono which corresponds vaguely to the [`external/mono`](external)
version. This is not strictly required; older mono versions *may* work, they
- just are not tested, and thus not guaranteed or supported.
- By default this is `5.4.0`.
+ just are not tested, and thus not guaranteed or supported.
* `$(MonoRequiredMaximumVersion)`: The max *system* mono version that is
required. This is so that we can ensure a stable build environment by
making sure we dont install unstable versions.
diff --git a/build-tools/dependencies/dependencies.projitems b/build-tools/dependencies/dependencies.projitems
index 85f38644080..a75e37dbb07 100644
--- a/build-tools/dependencies/dependencies.projitems
+++ b/build-tools/dependencies/dependencies.projitems
@@ -1,7 +1,7 @@
- <_DarwinMonoFramework>MonoFramework-MDK-5.4.0.147.macos10.xamarin.universal.pkg
+ <_DarwinMonoFramework>MonoFramework-MDK-5.8.0.22.macos10.xamarin.universal.pkg
<_AptGetInstall>apt-get -f -u install
@@ -59,7 +59,7 @@
$(MonoRequiredMaximumVersion)
$(MonoRequiredDarwinMinimumVersion)
$(MSBuildThisFileDirectory)..\scripts\mono-version
- https://bosstoragemirror.blob.core.windows.net/wrench/mono-2017-06/28/28a417c2c0d1a2d1231d8b0a5beea3201208b57d/$(_DarwinMonoFramework)
+ https://bosstoragemirror.azureedge.net/wrench/mono-2017-10/7e/7e85cfa5d228cd5148e59cde1d4d663457f96966/$(_DarwinMonoFramework)
installer -pkg "$(AndroidToolchainCacheDirectory)\$(_DarwinMonoFramework)" -target /
diff --git a/build-tools/mono-runtimes/mono-runtimes.projitems b/build-tools/mono-runtimes/mono-runtimes.projitems
index 5ae39ccfa89..4e69d5dc083 100644
--- a/build-tools/mono-runtimes/mono-runtimes.projitems
+++ b/build-tools/mono-runtimes/mono-runtimes.projitems
@@ -211,7 +211,7 @@
ranlib
strip
-S
- --enable-dynamic-btls --enable-maintainer-mode --without-ikvm-native --with-monodroid --with-mcs-docs=no --disable-mono-debugger --with-profile2=no --with-profile4=no --with-profile4_5=yes --disable-boehm --enable-nls=no --disable-iconv
+ --enable-dynamic-btls --enable-maintainer-mode --without-ikvm-native --with-monodroid --with-mcs-docs=no --disable-mono-debugger --with-profile4_x=no --disable-boehm --enable-nls=no --disable-iconv
libmonosgen-2.0
dylib
libmono-profiler-log
@@ -232,7 +232,7 @@
ranlib
strip
-S
- --enable-dynamic-btls --enable-maintainer-mode --without-ikvm-native --with-monodroid --with-mcs-docs=no --disable-mono-debugger --with-profile2=no --with-profile4=no --with-profile4_5=yes --disable-boehm --enable-nls=no --disable-iconv
+ --enable-dynamic-btls --enable-maintainer-mode --without-ikvm-native --with-monodroid --with-mcs-docs=no --disable-mono-debugger --with-profile4_x=no --disable-boehm --enable-nls=no --disable-iconv
libmonosgen-2.0
so
libmono-profiler-log
diff --git a/build-tools/mono-runtimes/mono-runtimes.props b/build-tools/mono-runtimes/mono-runtimes.props
index 182c3934e10..26eeaac438b 100644
--- a/build-tools/mono-runtimes/mono-runtimes.props
+++ b/build-tools/mono-runtimes/mono-runtimes.props
@@ -6,7 +6,7 @@
<_HostWinCFlags Condition=" '$(Configuration)' == 'Debug' ">-ggdb3 -O0 -DXAMARIN_PRODUCT_VERSION=0
<_HostWinCFlags Condition=" '$(Configuration)' == 'Release' ">-g -O2 -DXAMARIN_PRODUCT_VERSION=0
<_BtlsConfigureFlags>--enable-dynamic-btls --with-btls-android-ndk=$(AndroidToolchainDirectory)\ndk
- <_CommonConfigureFlags>--without-ikvm-native --enable-maintainer-mode --with-profile2=no --with-profile4=no --with-profile4_5=no --with-monodroid --enable-nls=no --with-sigaltstack=yes --with-tls=pthread mono_cv_uscore=yes
+ <_CommonConfigureFlags>--without-ikvm-native --enable-maintainer-mode --with-profile4_x=no --with-monodroid --enable-nls=no --with-sigaltstack=yes --with-tls=pthread mono_cv_uscore=yes
<_TargetConfigureFlags>$(_CommonConfigureFlags) --enable-minimal=ssa,portability,attach,verifier,full_messages,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,security,shared_handles --disable-mcs-build --disable-executables --disable-iconv --disable-boehm $(_BtlsConfigureFlags)
<_SecurityCFlags>-fstack-protector
<_TargetCFlags>$(_SecurityCFlags) -DMONODROID=1
diff --git a/build-tools/mono-runtimes/mono-runtimes.targets b/build-tools/mono-runtimes/mono-runtimes.targets
index 7636ae52b36..a921fabbb74 100644
--- a/build-tools/mono-runtimes/mono-runtimes.targets
+++ b/build-tools/mono-runtimes/mono-runtimes.targets
@@ -31,7 +31,7 @@
<_MonoProfileDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid
- <_MonoOutputDir>$(MonoSourceFullPath)\mcs\class\lib\net_4_x
+ <_MonoOutputDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid_tools
@@ -274,11 +274,11 @@
/>
<_RuntimeEglibHeaderSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
- Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\eglib\config.h');@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\eglib\src\eglib-config.h')"
+ Include="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\eglib\eglib-config.h')"
/>
<_RuntimeEglibHeaderOutput
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
- Include="@(_MonoRuntime->'$(_OutputIncludeDir)%(Identity)\eglib\config.h');@(_MonoRuntime->'$(_OutputIncludeDir)%(Identity)\eglib\eglib-config.h')"
+ Include="@(_MonoRuntime->'$(_OutputIncludeDir)%(Identity)\eglib\eglib-config.h')"
/>
<_MonoConstsSource
Condition=" '%(_MonoRuntime.DoBuild)' == 'True' "
@@ -305,7 +305,7 @@
Files="@(_RuntimeSource);@(_ProfilerSource);@(_MonoPosixHelperSource);@(_BclProfileItems);@(_MonoBtlsSource)"
/>
diff --git a/build-tools/xa-prep-tasks/xa-prep-tasks.targets b/build-tools/xa-prep-tasks/xa-prep-tasks.targets
index 125c9b411ed..2400351a948 100644
--- a/build-tools/xa-prep-tasks/xa-prep-tasks.targets
+++ b/build-tools/xa-prep-tasks/xa-prep-tasks.targets
@@ -5,7 +5,7 @@
- <_AzureBaseUri>https://xamjenkinsartifact.blob.core.windows.net/xamarin-android/xamarin-android/bin/
+ <_AzureBaseUri>https://xamjenkinsartifact.azureedge.net/xamarin-android/xamarin-android/bin/
<_NuGetUri>https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
<_NuGetPath>$(MSBuildThisFileDirectory)\..\..\.nuget
diff --git a/external/mono b/external/mono
index fbc487ff424..9f86587ade8 160000
--- a/external/mono
+++ b/external/mono
@@ -1 +1 @@
-Subproject commit fbc487ff424c479c25d0bbd24110d34890ffd793
+Subproject commit 9f86587ade83efdad9901a02073131f12d7de50f
diff --git a/external/xamarin-android-api-compatibility b/external/xamarin-android-api-compatibility
index 021f4ca3efb..c050ba3c124 160000
--- a/external/xamarin-android-api-compatibility
+++ b/external/xamarin-android-api-compatibility
@@ -1 +1 @@
-Subproject commit 021f4ca3efbd86c6a4871f9676cfe018f7d736c7
+Subproject commit c050ba3c124f628bee550756512a9ea7fbf4b4b7
diff --git a/src/Xamarin.Android.Build.Tasks/.gitignore b/src/Xamarin.Android.Build.Tasks/.gitignore
new file mode 100644
index 00000000000..5a79cc6410e
--- /dev/null
+++ b/src/Xamarin.Android.Build.Tasks/.gitignore
@@ -0,0 +1 @@
+/Xamarin.Android.Common.props
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 99d06e97979..5918e69bdf8 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
@@ -1085,9 +1085,11 @@ public void CheckWhichRuntimeIsIncluded (string[] supportedAbi, bool debugSymbol
Assert.AreEqual (runtime.Size, inApkRuntime.Size, "expected {0} got {1}", expectedRuntime, inApkRuntime.Runtime);
inApk = ZipHelper.ReadFileFromZip (apk, string.Format ("lib/{0}/libmono-profiler-log.so", abi));
if (string.Compare (expectedRuntime, "debug", StringComparison.OrdinalIgnoreCase) == 0) {
- Assert.IsNotNull (inApk, "libmono-profiler-log.so should exist in the apk.");
+ if (inApk == null)
+ Assert.Fail ("libmono-profiler-log.so should exist in the apk.");
} else {
- Assert.IsNull (inApk, "libmono-profiler-log.so should not exist in the apk.");
+ if (inApk != null)
+ Assert.Fail ("libmono-profiler-log.so should not exist in the apk.");
}
}
}
diff --git a/src/monodroid/jni/Android.mk b/src/monodroid/jni/Android.mk
index a3658629220..ae51e1a5d57 100644
--- a/src/monodroid/jni/Android.mk
+++ b/src/monodroid/jni/Android.mk
@@ -38,7 +38,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/../../../bin/$(CONFIGURATION)/include \
$(LOCAL_PATH)/../../../bin/$(CONFIGURATION)/include/$(TARGET_ARCH_ABI)/eglib \
- "$(MONO_PATH)/eglib/src" \
+ "$(MONO_PATH)/mono/eglib" \
$(LOCAL_PATH)/zip
LOCAL_LDLIBS := -llog -lz -lstdc++
diff --git a/src/monodroid/jni/monodroid-glue.c b/src/monodroid/jni/monodroid-glue.c
index f610239f2bc..3ff4bf10600 100644
--- a/src/monodroid/jni/monodroid-glue.c
+++ b/src/monodroid/jni/monodroid-glue.c
@@ -3426,7 +3426,7 @@ set_trace_options (void)
/* Profiler support cribbed from mono/metadata/profiler.c */
typedef void (*ProfilerInitializer) (const char*);
-#define INITIALIZER_NAME "mono_profiler_startup"
+#define INITIALIZER_NAME "mono_profiler_init"
static mono_bool
load_profiler (void *handle, const char *desc, const char *symbol)
@@ -3470,7 +3470,7 @@ load_embedded_profiler (const char *desc, const char *name)
}
static mono_bool
-load_profiler_from_directory (const char *directory, const char *libname, const char *desc)
+load_profiler_from_directory (const char *directory, const char *libname, const char *desc, const char *name)
{
char *full_name = path_combine (directory, libname);
int exists = file_exists (full_name);
@@ -3485,7 +3485,9 @@ load_profiler_from_directory (const char *directory, const char *libname, const
free (full_name);
if (h) {
- mono_bool result = load_profiler (h, desc, INITIALIZER_NAME);
+ char *symbol = monodroid_strdup_printf ("%s_%s", INITIALIZER_NAME, name);
+ mono_bool result = load_profiler (h, desc, symbol);
+ free (symbol);
if (result)
return 1;
dlclose (h);
@@ -3515,18 +3517,18 @@ monodroid_profiler_load (const char *libmono_path, const char *desc, const char
for (oi = 0; oi < MAX_OVERRIDES; ++oi) {
if (!directory_exists (override_dirs [oi]))
continue;
- if ((found = load_profiler_from_directory (override_dirs [oi], libname, desc)))
+ if ((found = load_profiler_from_directory (override_dirs [oi], libname, desc, mname)))
break;
}
do {
if (found)
break;
- if ((found = load_profiler_from_directory (app_libdir, libname, desc)))
+ if ((found = load_profiler_from_directory (app_libdir, libname, desc, mname)))
break;
if ((found = load_embedded_profiler (desc, mname)))
break;
- if (libmono_path != NULL && (found = load_profiler_from_directory (libmono_path, libname, desc)))
+ if (libmono_path != NULL && (found = load_profiler_from_directory (libmono_path, libname, desc, mname)))
break;
} while (0);
diff --git a/src/monodroid/monodroid.props b/src/monodroid/monodroid.props
index 9077bae6aee..d359c734007 100644
--- a/src/monodroid/monodroid.props
+++ b/src/monodroid/monodroid.props
@@ -3,7 +3,7 @@
<_DebugCFlags>-ggdb3 -O0 -fno-omit-frame-pointer
<_ReleaseCFlags>-g -O2
- <_CommonCFlags>-Ijni -Ijni/zip "-I$(MonoSourceFullPath)\eglib\src" -std=c99 -DSGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion) -D_REENTRANT -DHAVE_CONFIG_H -DMONO_DLL_EXPORT -DJI_DLL_EXPORT -fno-strict-aliasing -ffunction-sections -fvisibility=hidden -Wformat -Werror=format-security
+ <_CommonCFlags>-Ijni -Ijni/zip "-I$(MonoSourceFullPath)\mono\eglib" -std=c99 -DSGEN_BRIDGE_VERSION=$(MonoSgenBridgeVersion) -D_REENTRANT -DHAVE_CONFIG_H -DMONO_DLL_EXPORT -DJI_DLL_EXPORT -fno-strict-aliasing -ffunction-sections -fvisibility=hidden -Wformat -Werror=format-security
<_HostUnixCFlags>$(_CommonCFlags) -Wa,--noexecstack
<_HostUnixLdFlags>-Wall -lstdc++ -lz -shared -fpic
<_HostCommonWinCFlags>$(_CommonCFlags) -DWINDOWS -DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -fomit-frame-pointer
diff --git a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/java/JavaLib/.gitignore b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/java/JavaLib/.gitignore
new file mode 100644
index 00000000000..567609b1234
--- /dev/null
+++ b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/java/JavaLib/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/tests/Xamarin.Android.Bcl-Tests/Resources/LinkerDescription.xml b/tests/Xamarin.Android.Bcl-Tests/Resources/LinkerDescription.xml
index 96f3bb1cece..c293d8bfd76 100644
--- a/tests/Xamarin.Android.Bcl-Tests/Resources/LinkerDescription.xml
+++ b/tests/Xamarin.Android.Bcl-Tests/Resources/LinkerDescription.xml
@@ -37,6 +37,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+