[mono] Add a no-exec code manager for AOT compilation; switch Catalyst CI to JustInterp AOT mode (#53197)
* Initial pass at trying to run catalyst in aot interp only mode
* Cleanup
* Remove yml dup
* Incorporate changes and identify native libraries to skip during System.Diagnostics.FileVersionInfo test run
* [mini] Add a no-exec code manager for AOT compilation
Don't allocate pages with execute permission if we're never going to be executing code. Also don't try to toggle per-thread write protection if we're not expecting to write to executable pages.
* also set no_exec earlier and create the ALC codeman with noexec
* Don't assert on Catalyst in mono_codeman_enable_write
We defensively also toggle the page write protect bits when resolving some AOT patch targets in mono_resolve_patch_target_ext. Instead allow the call, but don't do anything.
* Set ENABLE_MONOTOUCH for MacCatalyst arm64. Define MONOTOUCH in one place
* [aot] mscorlib.dll isn't CoreLib on netcore
It's a forwarding assembly. Don't treat it specially
* [testing] In JustInterp mode, only AOT System.Private.CoreLib
We only need to AOT the trampolines in System.Private.CoreLib in interpreter-only mode. We don't need to AOT any of the user code in other assemblies.
Side effect: fixes the System.Runtime.Loader.DefaultContext testsuite in JustInterp mode. Still broken in Full AOT mode. (That testsuite references the System.Runtime.Loader.Noop.Assembly assembly, but with a different filename
System.Runtime.Loader.Noop.Assembly_test.dll which causes linking errors due to incorrect symbols in AOT module registration in AppleAppBuilder)
* Update iOS sample to use JustInterp
and adhoc signing
* Don't run iOS sample on the CI build machine
* Disable some tests
Fixes https://github.com/dotnet/runtime/issues/53106
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Steve Pfister <steve@Steves-M1.fios-router.home>
20 files changed: