Commit 251663a
[NativeAOT] Pass generated ACW keep rules to R8 on trimmable path
The trimmable NativeAOT path generates its ProGuard/R8 ACW keep rules
from the ILC DGML into proguard_project_references.cfg
(_ProguardProjectConfiguration) via GenerateNativeAotProguardConfiguration,
and deliberately leaves R8's proguard_project_primary.cfg empty so that
references.cfg is the sole source of ACW keeps.
However _CalculateProguardConfigurationFiles excluded
_ProguardProjectConfiguration for NativeAOT+trimmable, so R8 received no
ACW keep rules and tree-shook every JCW/ACW (e.g. UncaughtExceptionMarshaler)
out of classes.dex. The app then crashed at startup in
JavaInteropRuntime.init with:
java.lang.ClassNotFoundException: scrc64...UncaughtExceptionMarshaler
Drop the trimmable exclusion so the generated keep rules reach R8.
Verified on an arm64 emulator with CheckJNI enabled: the HelloWorld
NativeAOT (trimmable) sample now retains the ACW JCWs in classes.dex and
launches to MainActivity without crashing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 31c92ce commit 251663a
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2002 | 2002 | | |
2003 | 2003 | | |
2004 | 2004 | | |
2005 | | - | |
| 2005 | + | |
2006 | 2006 | | |
2007 | 2007 | | |
2008 | 2008 | | |
| |||
0 commit comments