-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/6.0.1xx-preview7] [dotnet] Add support for the interpreter + AOT when needed. Fixes #11421 and #11724. #12237
Conversation
… run the AOT compiler or not. We also can't link dynamically with libmonosgen-2.0.dylib if we AOT compile anything, so make sure we don't do that.
…his also meant propagating how libmono is linked from the MSBuild code to the Application class so that our existing logic is able to correctly determine which native mono lib to use.
…atalyst. The interpreter requires running the AOT compiler for System.Private.CoreLib.dll, so the first step in implementing the interpreter is to implement support for the AOT compiler as well. For .NET the logic is now as follows: * If the interpreter is enabled, AOT compile System.Private.CoreLib.dll. * If the interpreter is disabled, AOT everything on device + Mac Catalyst on ARM64.
…hem. This means not listing per-assembly linker flags for only binding projects, but delay it until we've computed the linker flags for all assemblies (and reflect this in variable names as well).
…phy.Native.Apple for Mac Catalyst. Fixes these test failures: Ctor_Trust: System.DllNotFoundException : libSystem.Security.Cryptography.Native.Apple MailX1: System.DllNotFoundException : libSystem.Security.Cryptography.Native.Apple Encrypt_Empty: System.DllNotFoundException : libSystem.Security.Cryptography.Native.Apple KeyRecordTest: System.DllNotFoundException : libSystem.Security.Cryptography.Native.Apple Basic_Leaf_Only: System.DllNotFoundException : libSystem.Security.Cryptography.Native.Apple which are all because of Xamarin.MacCatalyst: Unable to resolve P/Invoke 'AppleCryptoNative_X509GetContentType' in the library 'libSystem.Security.Cryptography.Native.Apple' which happens because without this change we're not linking with the static version of libSystem.Security.Cryptography.Native.Apple.
Using 'direct-pinvoke' will tell the AOT compiler to emit a direct call to the native function declared in the DllImport, which doesn't work when we want to redirect to a different native funcion (in our xamarin_pinvoke_override/PINVOKE_OVERRIDE implementation). This fixes our exception marshalling tests in monotouch-test.
This is not the final fix, but this code will be reworked extensively, and this fix works for now to make the interpreter work.
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diff✅ API Diff (from PR only) (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results1 tests failed, 114 tests passed.Failed tests
Pipeline on Agent XAMBOT-1104.BigSur' |
…talyst. It requires a backport of other test fixes (which we're not really interested in), so just ignore it.
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diff✅ API Diff (from PR only) (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results2 tests failed, 113 tests passed.Failed tests
Pipeline on Agent XAMBOT-1098.BigSur' |
Test failures are unrelated
|
because the interpreter needs it (at least System.Private.CoreLib.dll must
be AOT-compiled when using the interpreter).
interpreter, since we can't use the JIT.
Fixes #11724.
Fixes #11421.
Backport of #12211