Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] enable .NET 7 LLVM tests without Profiled AOT
Context: dotnet/runtime#68914 We found that the issue with LLVM only occurs when using Profiled AOT. This is enabled by default for `Release` builds in .NET 6+, so let's try using `-p:AndroidEnableProfiledAot=false`. This at least gets some of our LLVM test coverage running again. When testing this, we started getting a crash: 05-24 15:11:36.809 5024 5024 F DEBUG : Abort message: 'Internal p/invoke symbol 'java-interop @ java_interop_jvm_list' (hash: 0x58c48fc8b89cb484) not found in compile-time map.' It appeared that `Android.App.Application.cctor` was running before `JNIEnv.Initialize()` is complete: 05-25 11:12:33.177 10812 10812 D Mono : AOT: FOUND method Android.Runtime.JNIEnv/<>c:.cctor () [0x78e0d04608 - 0x78e0d04678 0x78e0d6f8a0] 05-25 11:12:33.177 10812 10812 D Mono : Running class .cctor for Java.Interop.Tools.TypeNameMappings.JavaNativeTypeManager from 'Mono.Android.dll' 05-25 11:12:33.177 10812 10812 D Mono : AOT: FOUND method Java.Interop.Tools.TypeNameMappings.JavaNativeTypeManager:.cctor () [0x78e0d31d24 - 0x78e0d31d64 0x78e0d6f8a0] 05-25 11:12:33.177 10812 10812 D Mono : Running class .cctor for Android.App.Application from 'Mono.Android.dll' By adding an explicit static constructor to `Android.App.Application`, this appears to have workaround this issue.
- Loading branch information