Enable WASM AOT option in build and update MonoAOTCompiler (#44468)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 13 Nov 2020 16:25:02 +0000 (17:25 +0100)
committerGitHub <noreply@github.com>
Fri, 13 Nov 2020 16:25:02 +0000 (17:25 +0100)
commit85d2df801ab4c91fc7e3c1f61752c4d305b2a7d0
tree717d5e6c079cb7bceb5d8a265d2feeabc8b6710e
parent40cd99872991f0e9839693cc37339d65a2171080
Enable WASM AOT option in build and update MonoAOTCompiler (#44468)

Allows creating AOT images for WASM with the AOT compiler and consuming them in the runtime.

Use `make build AOT=1` in `src/mono/netcore/sample/wasm/console` to try it out.

--

Also fix a regression in aot-compiler.c regarding SPC->corlib assembly name:

In https://github.com/dotnet/runtime/commit/035ebeab160b9a281e5fbb3fa0c237f244c81b7a we added a simplified prefix for symbol names in System.Private.CoreLib.
However this shouldn't happen for the actual assembly name otherwise we aren't able to find the AOT module linked statically into the binary.
22 files changed:
eng/liveBuilds.targets
eng/testing/tests.mobile.targets
src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj
src/mono/mono.proj
src/mono/mono/mini/aot-compiler.c
src/mono/mono/mini/mini-wasm.c
src/mono/netcore/sample/iOS/Program.csproj
src/mono/netcore/sample/wasm/browser/Makefile
src/mono/netcore/sample/wasm/browser/WasmSample.csproj
src/mono/netcore/sample/wasm/console/Makefile
src/mono/netcore/sample/wasm/console/WasmSample.csproj
src/mono/wasm/Makefile
src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj
src/mono/wasm/wasm.proj
tools-local/tasks/mobile.tasks/AotCompilerTask/MonoAOTCompiler.cs
tools-local/tasks/mobile.tasks/AotCompilerTask/MonoAOTCompiler.props
tools-local/tasks/mobile.tasks/AppleAppBuilder/AppleAppBuilder.cs
tools-local/tasks/mobile.tasks/AppleAppBuilder/Templates/CMakeLists.txt.template
tools-local/tasks/mobile.tasks/AppleAppBuilder/Templates/runtime.m
tools-local/tasks/mobile.tasks/AppleAppBuilder/Xcode.cs
tools-local/tasks/mobile.tasks/WasmAppBuilder/WasmAppBuilder.cs