ReviewOS

also looking at this

craft-native/craft

perf(android): ship libcraft.so without its DWARF, and keep the DWARF for symbols

#217
Merged glennmichael123 wants to merge fix/android-strip-libcraft into main
6 files +235 -14
packages/android/README.mdmodified+14-0
Changes to packages/android/README.md
@@ -611,6 +611,20 @@ For automated uploads, integrate with fastlane:
611611fastlane supply --aab ./android/app/build/outputs/bundle/release/app-release.aab
612612```
613613
614### Native crash symbols
615
616`zig build build-android-all` strips the DWARF out of each release
617`libcraft.so` before the generator copies it into `jniLibs`. With it, the
618library was about 5.5 MB per ABI in every APK. The symbol table stays, so a
619native crash tombstone still names functions. The DWARF goes to
620`zig-out/android-symbols/<abi>/libcraft.so.debug`, linked from the library by
621`.gnu_debuglink`.
622
623To symbolicate a crash, point `ndk-stack -sym` at that directory. To have Play
624Console symbolicate for you, upload the `.debug` files as the release's native
625debug symbols. A `-Doptimize=Debug` build keeps the debug info in the library
626itself.
627
614628## License
615629
616630MIT