Skip to content

Commit 5e38da1

Browse files
authored
Merge pull request #202 from winnerspiros/copilot/fix-warnings-and-crash-logs
Fix AOT crash (plt_entry assertion) and suppress release workflow warnings
2 parents e8f6000 + e4f2525 commit 5e38da1

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
-p:AndroidSigningKeyAlias="$ANDROID_KEY_ALIAS"
110110
-p:AndroidSigningKeyPass="$ANDROID_KEY_PASS"
111111
-p:AndroidSigningStorePass="$ANDROID_STORE_PASS"
112+
-p:CustomBeforeMicrosoftCommonTargets="${{ github.workspace }}/build/SuppressSubmoduleWarnings.targets"
112113
113114
- name: Build Android APK (unsigned Release)
114115
if: steps.keystore.outputs.has_keystore != 'true'
@@ -119,6 +120,7 @@ jobs:
119120
-p:Version="${{ steps.version.outputs.version }}"
120121
-p:ApplicationDisplayVersion="${{ steps.version.outputs.version }}"
121122
-p:ApplicationVersion="${{ github.run_number }}"
123+
-p:CustomBeforeMicrosoftCommonTargets="${{ github.workspace }}/build/SuppressSubmoduleWarnings.targets"
122124
123125
- name: Find APK
124126
id: find_apk
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<!-- Suppress CS1591 (missing XML doc comments) for submodule projects that enable
3+
documentation generation but don't suppress the warning in Release builds.
4+
This file is imported via CustomBeforeMicrosoftCommonTargets in the release workflow. -->
5+
<PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('submodules'))">
6+
<NoWarn>$(NoWarn);CS1591</NoWarn>
7+
</PropertyGroup>
8+
</Project>

osu.Android.props

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
AndroidPageSize16KBCompatibilityCheck=false should suppress the check, but Android SDK
2424
36.1.53 still emits XA0141 in some build orderings, so we also add it to NoWarn. -->
2525
<AndroidPageSize16KBCompatibilityCheck>false</AndroidPageSize16KBCompatibilityCheck>
26-
<NoWarn>$(NoWarn);XA0141</NoWarn>
26+
<NoWarn>$(NoWarn);XA0141;NU1608;XA4301</NoWarn>
2727
<!-- Disable ELF alignment patching for ALL configurations.
2828
The custom PatchElfPageSize task can run concurrently with the Android packaging step
2929
because MSBuild's BeforeTargets="Build" fires for every ABI sub-build, which often
@@ -53,9 +53,13 @@
5353
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
5454
<PublishTrimmed>true</PublishTrimmed>
5555
<TrimMode>partial</TrimMode>
56-
<!-- Strip IL bodies from AOT-compiled assemblies. The runtime uses the native .so code
57-
instead, and IL is only kept for non-AOT methods. This can save 20-30 MB. -->
58-
<AndroidStripILAfterAOT>true</AndroidStripILAfterAOT>
56+
<!-- Keep IL bodies as a fallback for methods not covered by profiled AOT.
57+
AndroidEnableProfiledAot only AOT-compiles methods in the startup profile; the remaining
58+
methods require IL for JIT/interpretation. Stripping IL (AndroidStripILAfterAOT=true)
59+
removes that fallback, causing 'plt_entry not met' assertions in aot-runtime.c when
60+
the runtime encounters an un-AOT'd method (observed on .NET Timer thread at startup).
61+
The ~20-30 MB size saving is not worth the crash risk. -->
62+
<AndroidStripILAfterAOT>false</AndroidStripILAfterAOT>
5963
<!-- Compress managed assemblies inside the APK (LZ4). Android extracts them on first run
6064
but the download/APK size is significantly smaller. -->
6165
<AndroidEnableAssemblyCompression>true</AndroidEnableAssemblyCompression>

0 commit comments

Comments
 (0)