Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
9da4a6d
Bump to mono:2017-12
luhenry Dec 11, 2017
e064e11
Fix compilation errors with mono:2017-12
luhenry Dec 13, 2017
c48be82
Fix compilation errors with mono:2017-12
luhenry Dec 20, 2017
665022b
Merge remote-tracking branch 'origin/master' into mono-2017-12
luhenry Dec 22, 2017
0edb4b3
Bump to mono/2017-12
luhenry Jan 12, 2018
a19d1ea
Merge branch 'master' of github.com:xamarin/xamarin-android into HEAD
luhenry Jan 12, 2018
07b188d
Copy XUnit assemblies from a different location than NUnit assemblies
luhenry Jan 19, 2018
89444df
Bump to mono/2017-12
luhenry Jan 19, 2018
f0ab475
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Jan 19, 2018
678818f
Bump to mono/2017-12
luhenry Jan 22, 2018
221b7a7
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Jan 22, 2018
30e7561
Bump to mono/2017-12
luhenry Jan 24, 2018
64af858
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Jan 24, 2018
4ab19ee
Bump to mono/2017-12
luhenry Jan 31, 2018
533c7c0
Bump to Java.Interop/mono-2017-12
luhenry Jan 31, 2018
d1f741d
Merge remote-tracking branch 'origin/master' into mono-2017-12
luhenry Jan 31, 2018
def9f75
Fix msbuild variable for copying mono tests
luhenry Feb 1, 2018
c5d00d4
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Feb 1, 2018
a7f3c95
Fix compilation of monodroid_corlib_xunit-test.dll
luhenry Feb 2, 2018
99ff423
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Feb 2, 2018
aa9abcb
Exclude System.Runtime.CompilerServices.Unsafe from install
luhenry Feb 2, 2018
d5fbc29
Fix compilation of monodroid_corlib_xunit-test.dll (second attempt)
luhenry Feb 2, 2018
c303aa3
Fix missing System.Runtime.CompilerServices.Unsafe.pdb
luhenry Feb 3, 2018
6dada7c
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Feb 5, 2018
991c315
Bump to mono:2018-02
luhenry Feb 6, 2018
6f4cf7f
Fix missed MonoRequiredDarwinMinimumVersion for bumping
luhenry Feb 6, 2018
c308714
Bump Mono to 7126712f8632560b4909e224d35be3a64255b037.
Feb 9, 2018
c96d238
Update _DarwinMonoFramework.
Feb 9, 2018
e83851c
Update Xamarin.Android.Build.Tasks.csproj to reflect linker changes.
Feb 9, 2018
2658937
Bump Mono.
Feb 13, 2018
6480118
Merge branch 'master' into mono-2018-02
Feb 13, 2018
9fd1f4d
Fix package version.
Feb 14, 2018
fb36c74
Update DarwinMinimumUrl.
Feb 14, 2018
e9c3690
linkeranalyzer -> illinkanalyzer
Feb 21, 2018
faee6c6
Squashed commit of the following:
Feb 21, 2018
02684ad
Bump Mono.
Feb 21, 2018
d41ba7e
Make it build.
Feb 21, 2018
6d5cd94
Merge remote-tracking branch 'origin/master' into mono-2018-02
luhenry Feb 26, 2018
676104b
FIXME: ignore missing symbol files.
Feb 27, 2018
754f8c7
Revert "FIXME: ignore missing symbol files."
Mar 1, 2018
8ffe624
Bump Mono.
Mar 1, 2018
5fb2e06
Make it build.
Mar 1, 2018
a545097
Bump Mono.
Mar 5, 2018
fc09397
Update DarwinMinimumUrl.
Mar 5, 2018
c7a0724
Fix package url.
Mar 6, 2018
1b04260
Bump to mono:2018-02
luhenry Mar 8, 2018
5badf17
Bump system mono to `mono:2018-02`
luhenry Mar 9, 2018
8ef1c38
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Mar 9, 2018
371664e
Bump to mono:2018-02
luhenry Mar 9, 2018
3ca43b3
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Mar 16, 2018
c923c7b
Bump to mono:2018-02
luhenry Mar 16, 2018
a8de9a6
Bump to mono:2018-02
lewurm Mar 20, 2018
5f657aa
Bump to mono:2018-02
lewurm Mar 21, 2018
a04af17
Merge remote-tracking branch 'origin/master' into mono-2018-02
lewurm Mar 21, 2018
f131f29
Bump to mono/2018-04/59e6eb29
luhenry Apr 3, 2018
5a99fa1
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Apr 4, 2018
0e08b2e
Bump external/mono.
Apr 12, 2018
7de6e08
[Xamarin.Android.Build.Tasks] Add new linker source file to the build.
Apr 13, 2018
cc79649
Bump external/Java.Interop.
Apr 13, 2018
6965cc7
Bump external/llvm.
Apr 13, 2018
86062ea
Update _DarwinMonoFramework.
Apr 13, 2018
cb180e8
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
Apr 16, 2018
c756c5f
Bump external/Java.Interop.
Apr 16, 2018
8aeaf17
Bump external/mono.
Apr 16, 2018
2b1da0c
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Apr 25, 2018
de87018
Bump to mono/2018-04/61fa43b9
luhenry Apr 25, 2018
3009fe6
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Apr 25, 2018
cf16997
Merge remote-tracking branch 'origin/mono-2018-04'
radical May 7, 2018
8d90f12
Bump to mono/2018-04/f3577389f6d76c70312418dafd6d877e9ef53eb6
radical May 9, 2018
198e88a
Merge branch 'master' into mono-2018-04
radical May 9, 2018
da13635
Merge remote-tracking branch 'origin/master' into mono-2018-04
radical May 10, 2018
a00d65a
Bump mono to pick up linker bump
radical May 10, 2018
89de816
Bump mono to correctly pick up linker bump
radical May 10, 2018
08b187d
Bump mono to pick up linker bump
radical May 10, 2018
8a45b3c
Bump mono to f58049675ee090399fec2718835b28dd0cf0ac81 and pick up lin…
radical May 10, 2018
301e4f5
bump mono to 1aa3993057e679fb8534d37bf911c3ec3980569b
radical May 10, 2018
be48c75
Bump mono to 0aa2949744a9f934fc620de5ae41f0876f7c6b35
radical May 11, 2018
956184c
Add missing linker cs file to Xamarin.Android.Build.Tasks.csproj
radical May 11, 2018
a0a709d
Bump mono to pick up new linker
radical May 11, 2018
b1f6680
Bump mono
marek-safar May 24, 2018
18a8c01
Merge remote-tracking branch 'origin/master' into mono-2018-04
May 29, 2018
d5f4089
Merge remote-tracking branch 'origin/master' into mono-2018-04
May 30, 2018
2533ef4
Fixup submodule refs for llvm, libzip and LibZipSharp to match master
May 30, 2018
fc10845
Bump mono to 2018-04/2987232bc146c37d93df87badf83555e08da94d4
May 30, 2018
9efeb0f
Bump to mono/2018-02/569bd3bc
luhenry Jun 15, 2018
11bc5b6
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Jun 15, 2018
6b65a13
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Jun 18, 2018
fa1e695
Bump to mono/2018-04/07c8f25f
luhenry Jun 18, 2018
285f4bc
Bump to mono/2018-04/8ae8c523
luhenry Jun 22, 2018
0055023
Bump Mono Package to mono/2018-04/8ae8c52
luhenry Jun 22, 2018
e359acc
Bump Mono Package to mono/2018-04/8ae8c52
luhenry Jun 22, 2018
5afb71c
Better mkbundle interop
grendello May 17, 2018
edcbc94
Bump to mono/2018-04/ebc0c7c2
luhenry Jul 18, 2018
4973bcd
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Jul 18, 2018
01ca6df
[xabuild] reference missing assembly on newer Mono versions
jonathanpeppers Jul 18, 2018
d2b5581
Bump mono
marek-safar Jul 20, 2018
9dd2f62
Merge remote-tracking branch 'origin/master' into mono-2018-04
marek-safar Jul 20, 2018
740fd73
Fixes expected exception to reflect changes in https://github.com/mon…
marek-safar Jul 23, 2018
e128551
Bump mono
marek-safar Jul 24, 2018
c7bebdf
Bump mono
marek-safar Jul 26, 2018
4475145
[build] Export `ALL_*` make variables
jonpryor Aug 6, 2018
31e3bf8
[mono] Make sure we build the right target runtime for the cross comp…
luhenry Aug 6, 2018
66ebad8
Merge branch 'master' of github.com:xamarin/xamarin-android into mono…
luhenry Aug 6, 2018
85837d2
Bump to mono/2018-04/f3a2216b
luhenry Aug 6, 2018
e358cb5
Revert "[build] Export `ALL_*` make variables"
luhenry Aug 7, 2018
305466b
[mkbundle] Make sure we don't polute the msbuild namespace and prefix…
luhenry Aug 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[submodule "external/mono"]
path = external/mono
url = https://github.com/mono/mono.git
branch = 2018-02
branch = 2018-04
[submodule "external/mxe"]
path = external/mxe
url = https://github.com/xamarin/mxe.git
Expand Down
4 changes: 2 additions & 2 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<JavaInteropSourceDirectory Condition=" '$(JavaInteropSourceDirectory)' == '' ">$(MSBuildThisFileDirectory)external\Java.Interop</JavaInteropSourceDirectory>
<LlvmSourceDirectory Condition=" '$(LlvmSourceDirectory)' == '' ">$(MSBuildThisFileDirectory)external\llvm</LlvmSourceDirectory>
<MonoSourceDirectory>$(MSBuildThisFileDirectory)external\mono</MonoSourceDirectory>
<MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">5.12.0</MonoRequiredMinimumVersion>
<MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">5.13.0</MonoRequiredMaximumVersion>
<MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">5.14.0</MonoRequiredMinimumVersion>
<MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">5.15.0</MonoRequiredMaximumVersion>
<IgnoreMaxMonoVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' ">True</IgnoreMaxMonoVersion>
<MonoRequiredDarwinMinimumVersion>$(MonoRequiredMinimumVersion).0</MonoRequiredDarwinMinimumVersion>
<LinkerSourceDirectory>$(MSBuildThisFileDirectory)external\mono\external\linker</LinkerSourceDirectory>
Expand Down
4 changes: 2 additions & 2 deletions build-tools/dependencies/dependencies.projitems
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_DarwinMonoFramework>MonoFramework-MDK-5.12.0.210.macos10.xamarin.universal.pkg</_DarwinMonoFramework>
<_DarwinMonoFramework>MonoFramework-MDK-5.14.0.141.macos10.xamarin.universal.pkg</_DarwinMonoFramework>
<_AptGetInstall>apt-get -f -u install</_AptGetInstall>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -59,7 +59,7 @@
<MaximumVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' Or '$(IgnoreMaxMonoVersion)' == 'False' " >$(MonoRequiredMaximumVersion)</MaximumVersion>
<DarwinMinimumVersion>$(MonoRequiredDarwinMinimumVersion)</DarwinMinimumVersion>
<CurrentVersionCommand>$(MSBuildThisFileDirectory)..\scripts\mono-version</CurrentVersionCommand>
<DarwinMinimumUrl>https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-02/177/9bbc930d620487446f537e729f018eb965523fcd/$(_DarwinMonoFramework)</DarwinMinimumUrl>
<DarwinMinimumUrl>https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-04/116/8ae8c52383b43892fb7a35dbf0992738bd52fa90/$(_DarwinMonoFramework)</DarwinMinimumUrl>
<DarwinInstall>installer -pkg "$(AndroidToolchainCacheDirectory)\$(_DarwinMonoFramework)" -target /</DarwinInstall>
</RequiredProgram>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion external/mono
Submodule mono updated 1693 files
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ public void Send_Transfer_Encoding_Custom ()
client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Wait ();
Assert.Fail ("#1");
} catch (AggregateException e) {
Assert.AreEqual (typeof (ProtocolViolationException), e.InnerException.GetType (), "#2");
Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType (), "#2");
}
Assert.IsNull (failed, "#102");
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class MakeBundleNativeCodeExternal : Task
public bool EmbedDebugSymbols { get; set; }
public bool KeepTemp { get; set; }

[Required]
public string BundleApiPath { get; set; }

[Output]
public ITaskItem [] OutputNativeLibraries { get; set; }

Expand Down Expand Up @@ -113,6 +116,8 @@ bool DoExecute ()
clb.AppendSwitch ("--nomain");
clb.AppendSwitch ("--i18n none");
clb.AppendSwitch ("--bundled-header");
clb.AppendSwitch ("--mono-api-struct-path");
clb.AppendFileNameIfNotNull (BundleApiPath);
clb.AppendSwitch ("--style");
clb.AppendSwitch ("linux");
clb.AppendSwitch ("-c");
Expand Down Expand Up @@ -157,22 +162,6 @@ bool DoExecute ()
return false;
}

Log.LogDebugMessage ("[mkbundle] modifying mono_mkbundle_init");
// make some changes in the mkbundle output so that it does not require libmonodroid.so
var mkbundleOutput = new StringBuilder (File.ReadAllText (Path.Combine (outpath, "temp.c")));

mkbundleOutput.Replace ("mono_jit_set_aot_mode", "mono_jit_set_aot_mode_ptr")
.Replace ("void mono_mkbundle_init ()", "void mono_mkbundle_init (void (register_bundled_assemblies_func)(const MonoBundledAssembly **), void (register_config_for_assembly_func)(const char *, const char *), void (mono_jit_set_aot_mode_func) (int mode))")
.Replace ("mono_register_config_for_assembly (\"", "register_config_for_assembly_func (\"")
.Replace ("install_dll_config_files (void)", "install_dll_config_files (void (register_config_for_assembly_func)(const char *, const char *))")
.Replace ("install_dll_config_files ()", "install_dll_config_files (register_config_for_assembly_func)")
.Replace ("mono_register_bundled_assemblies(", "register_bundled_assemblies_func(")
.Replace ("int nbundles;", "int nbundles;\n\n\tmono_jit_set_aot_mode_ptr = mono_jit_set_aot_mode_func;");

mkbundleOutput.Insert (0, "void (*mono_jit_set_aot_mode_ptr) (int mode);\n");

File.WriteAllText (Path.Combine (outpath, "temp.c"), mkbundleOutput.ToString ());

// then compile temp.c into temp.o and ...

clb = new CommandLineBuilder ();
Expand All @@ -182,6 +171,10 @@ bool DoExecute ()
// defined even if we don't use them
clb.AppendSwitch ($"-D__ANDROID_API__={level}");

// This is necessary because of the injected code, which is reused between libmonodroid
// and the bundle
clb.AppendSwitch ("-DANDROID");

clb.AppendSwitch ("-o");
clb.AppendFileNameIfNotNull (Path.Combine (outpath, "temp.o"));
if (!string.IsNullOrWhiteSpace (IncludePath)) {
Expand Down
10 changes: 10 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\AssemblyResolver.cs">
<Link>Linker\Linker\AssemblyResolver.cs</Link>
</Compile>
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\AssemblyUtilities.cs">
<Link>Linker\Linker\AssemblyUtilities.cs</Link>
</Compile>
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\I18nAssemblies.cs">
<Link>Linker\Linker\I18nAssemblies.cs</Link>
</Compile>
Expand All @@ -359,6 +362,9 @@
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\Pipeline.cs">
<Link>Linker\Linker\Pipeline.cs</Link>
</Compile>
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\TypeNameParser.cs">
<Link>Linker\Linker\TypeNameParser.cs</Link>
</Compile>
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\TypePreserve.cs">
<Link>Linker\Linker\TypePreserve.cs</Link>
</Compile>
Expand Down Expand Up @@ -576,6 +582,10 @@
<Link>LayoutBinding.cs</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\monodroid\jni\mkbundle-api.h">
<Link>mkbundle-api.h</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Compile Include="Tasks\JavaDoc.cs" />
<Compile Include="Linker\MonoDroid.Tuner\AndroidLinkContext.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,8 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<_InstantRunEnabled Condition=" '$(_InstantRunEnabled)' == '' ">False</_InstantRunEnabled>
<_AndroidBuildPropertiesCache>$(IntermediateOutputPath)build.props</_AndroidBuildPropertiesCache>
<_AndroidDesignTimeBuildPropertiesCache>$(_AndroidIntermediateDesignTimeBuildDirectory)build.props</_AndroidDesignTimeBuildPropertiesCache>

<AndroidGenerateJniMarshalMethods Condition=" '$(AndroidGenerateJniMarshalMethods)' == '' ">False</AndroidGenerateJniMarshalMethods>

<AndroidMakeBundleKeepTemporaryFiles Condition=" '$(AndroidMakeBundleKeepTemporaryFiles)' == '' ">False</AndroidMakeBundleKeepTemporaryFiles>
</PropertyGroup>

<Choose>
Expand Down Expand Up @@ -2720,12 +2719,14 @@ because xbuild doesn't support framework reference assemblies.
<!-- Bundle the assemblies into native libraries in the apk -->
<MakeBundleNativeCodeExternal
Condition="'$(BundleAssemblies)' == 'True'"
KeepTemp="$(AndroidMakeBundleKeepTemporaryFiles)"
AndroidNdkDirectory="$(_AndroidNdkDirectory)"
Assemblies="@(_ResolvedUserAssemblies);@(_AndroidResolvedSatellitePaths);@(_ShrunkFrameworkAssemblies)"
IncludePath="$(MonoAndroidIncludeDirectory)"
SupportedAbis="$(_BuildTargetAbis)"
TempOutputPath="$(IntermediateOutputPath)"
ToolPath="$(_MonoAndroidToolsDirectory)">
ToolPath="$(_MonoAndroidToolsDirectory)"
BundleApiPath="$(MSBuildThisFileDirectory)\mkbundle-api.h">
<Output TaskParameter="OutputNativeLibraries" PropertyName="_BundleResultNativeLibraries" />
</MakeBundleNativeCodeExternal>
<!-- Put the assemblies and native libraries in the apk -->
Expand Down
8 changes: 4 additions & 4 deletions src/mono-runtimes/mono-runtimes.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
runtime's build
-->
<PropertyGroup>
<_ArmeabiRuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':armeabi:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-armeabi:'))">true</_ArmeabiRuntimeConfigure>
<_ArmeabiRuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':armeabi:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':armeabi:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-armeabi:')) ">true</_ArmeabiRuntimeConfigure>
<_ArmeabiRuntimeBuild Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':armeabi:'))">true</_ArmeabiRuntimeBuild>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -41,7 +41,7 @@
</ItemGroup>

<PropertyGroup>
<_Arm64RuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':arm64-v8a:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-arm64:'))">true</_Arm64RuntimeConfigure>
<_Arm64RuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':arm64-v8a:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':arm64:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-arm64:'))">true</_Arm64RuntimeConfigure>
<_Arm64RuntimeBuild Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':arm64-v8a:'))">true</_Arm64RuntimeBuild>
</PropertyGroup>
<ItemGroup>
Expand All @@ -58,7 +58,7 @@
</ItemGroup>

<PropertyGroup>
<_X86RuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':x86:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86:'))">true</_X86RuntimeConfigure>
<_X86RuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':x86:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':x86:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86:'))">true</_X86RuntimeConfigure>
<_X86RuntimeBuild Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':x86:'))">true</_X86RuntimeBuild>
</PropertyGroup>
<ItemGroup>
Expand All @@ -75,7 +75,7 @@
</ItemGroup>

<PropertyGroup>
<_X8664RuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':x86_64:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86_64:'))">true</_X8664RuntimeConfigure>
<_X8664RuntimeConfigure Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':x86_64:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':x86_64:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86_64:'))">true</_X8664RuntimeConfigure>
<_X8664RuntimeBuild Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains (':x86_64:'))">true</_X8664RuntimeBuild>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/monodroid/jni/dylib-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int monodroid_dylib_mono_init (struct DylibMono *mono_imports, const char *libmo
LOAD_SYMBOL(mono_thread_create)
LOAD_SYMBOL(mono_thread_current)
LOAD_SYMBOL(mono_use_llvm)

LOAD_SYMBOL(mono_aot_register_module)

if (symbols_missing) {
log_fatal (LOG_DEFAULT, "Failed to load some Mono symbols, aborting...");
Expand Down
2 changes: 2 additions & 0 deletions src/monodroid/jni/dylib-mono.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ typedef MonoThread* (*monodroid_mono_thread_current_fptr) (void);
typedef void (*monodroid_mono_gc_disable_fptr) (void);
typedef void* (*monodroid_mono_install_assembly_refonly_preload_hook_fptr) (MonoAssemblyPreLoadFunc func, void *user_data);
typedef int (*monodroid_mono_runtime_set_main_args_fptr) (int argc, char* argv[]);
typedef void (*mono_aot_register_module_fptr) (void* aot_info);

/* NOTE: structure members MUST NOT CHANGE ORDER. */
struct DylibMono {
Expand Down Expand Up @@ -342,6 +343,7 @@ struct DylibMono {
monodroid_mono_class_get_property_from_name_fptr mono_class_get_property_from_name;
monodroid_mono_domain_from_appdomain_fptr mono_domain_from_appdomain;
monodroid_mono_thread_current_fptr mono_thread_current;
mono_aot_register_module_fptr mono_aot_register_module;
};

MONO_API struct DylibMono* monodroid_dylib_mono_new (const char *libmono_path);
Expand Down
27 changes: 27 additions & 0 deletions src/monodroid/jni/mkbundle-api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef __MKBUNDLE_API_H
#define __MKBUNDLE_API_H
typedef struct BundleMonoAPI
{
void (*mono_register_bundled_assemblies) (const MonoBundledAssembly **assemblies);
void (*mono_register_config_for_assembly) (const char* assembly_name, const char* config_xml);
void (*mono_jit_set_aot_mode) (int mode);
void (*mono_aot_register_module) (void* aot_info);
void (*mono_config_parse_memory) (const char *buffer);
void (*mono_register_machine_config) (const char *config_xml);
} BundleMonoAPI;

#if ANDROID
#include <stdarg.h>
#include <android/log.h>

static void
mkbundle_log_error (const char *format, ...)
{
va_list ap;

va_start (ap, format);
__android_log_vprint (ANDROID_LOG_ERROR, "mkbundle", format, ap);
va_end (ap);
}
#endif // ANDROID
#endif // __MKBUNDLE_API_H
22 changes: 21 additions & 1 deletion src/monodroid/jni/monodroid-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#include "unzip.h"
#include "ioapi.h"
#include "monodroid-glue.h"
#include "mkbundle-api.h"

#ifndef WINDOWS
#include "xamarin_getifaddrs.h"
Expand Down Expand Up @@ -701,6 +702,7 @@ get_libmonosgen_path ()

typedef void* (*mono_mkbundle_init_ptr) (void (*)(const MonoBundledAssembly **), void (*)(const char* assembly_name, const char* config_xml),void (*) (int mode));
mono_mkbundle_init_ptr mono_mkbundle_init;
void (*mono_mkbundle_initialize_mono_api) (const BundleMonoAPI *info);

static void
setup_bundled_app (const char *libappso)
Expand All @@ -713,7 +715,11 @@ setup_bundled_app (const char *libappso)
log_fatal (LOG_BUNDLE, "bundled app initialization error: %s", dlerror ());
exit (FATAL_EXIT_CANNOT_LOAD_BUNDLE);
}


mono_mkbundle_initialize_mono_api = dlsym (libapp, "initialize_mono_api");
if (!mono_mkbundle_initialize_mono_api)
log_error (LOG_BUNDLE, "Missing initialize_mono_api in the application");

mono_mkbundle_init = dlsym (libapp, "mono_mkbundle_init");
if (!mono_mkbundle_init)
log_error (LOG_BUNDLE, "Missing mono_mkbundle_init in the application");
Expand Down Expand Up @@ -2655,6 +2661,20 @@ mono_runtime_init (char *runtime_args)

register_gc_hooks ();

if (mono_mkbundle_initialize_mono_api) {
BundleMonoAPI bundle_mono_api = {
.mono_register_bundled_assemblies = mono.mono_register_bundled_assemblies,
.mono_register_config_for_assembly = mono.mono_register_config_for_assembly,
.mono_jit_set_aot_mode = mono.mono_jit_set_aot_mode,
.mono_aot_register_module = mono.mono_aot_register_module,
.mono_config_parse_memory = mono.mono_config_parse_memory,
.mono_register_machine_config = mono.mono_register_machine_config,
};

/* The initialization function copies the struct */
mono_mkbundle_initialize_mono_api (&bundle_mono_api);
}

if (mono_mkbundle_init)
mono_mkbundle_init (mono.mono_register_bundled_assemblies, mono.mono_register_config_for_assembly, mono.mono_jit_set_aot_mode);

Expand Down