-
Notifications
You must be signed in to change notification settings - Fork 110
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
cargo-apk: Add strip
configuration to manifest
#356
Conversation
This is because the value defaults to And that was simply repeated in the example.
Please don't make drive-by changes: that's terrible for review, bisecting, proper commit/PR titling (:thinking:) and changelog keeping (which is surprisingly also missing here). |
As for the rest of the change (once separated out into logical PRs), can anyone else pick up review? I currently don't have any bandwidth remaining for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine to me, an entry in our example manifest is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good besides some wording issues in doc comments and indentation issues in the README
. Feel free to document the effect/affect of Rust's strip
option on this cargo-apk strip config.
strip
optionstrip
configuration to manifest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just bike-shedding the wording now :)
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Marijn Suijten <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more nits, and feel free to add back the <>
around markdown links, then we're ready to merge!
Co-authored-by: Marijn Suijten <[email protected]>
I've been extremely annoyed with the time that
cargo-apk
adds onto our build for a long time and today was the day that I got annoyed enough to fix it.This PR adds a configuration field,
package.metadata.android.strip
that allows users to configure how they want to treat debug symbols after cargo build has finished, but before the .so libraries are appended to the APK.default
- This acts the exact same as the current version of cargo-apk, and is the value used ifstrip
is not explicitly set. The .so produced by cargo is simply copied to theapk
output directory with no modification.strip
- The library copied into the apk output directory is stripped of debug symbolssplit
- The library copied into the apk output directory is stripped of debug symbols, in addition, the debug symbols are copied into the directory as well with the same filename as the library, but a.dwarf
extension.#355 was closed with the suggestion to just use the strip option in cargo, but unfortunately that doesn't work for our use case. We absolutely do want debug symbols, since we upload all debug symbols to our symbol server so that we can either use them for debugging, or most likely, as the source for the debugging information our error/crash reporting system uses to resolve symbolicated stack traces. Using
strip
to remove debug info is therefore not an option for us, and unfortunatelysplit-debuginfo
doesn't actually do anything when targeting android, at least at the moment. That being said I think this option still makes sense oncesplit-debuginfo
does work for android, since it keeps the split symbols next to the library they are paired with, which makes it nicer for any tooling that is doing any kind of processing to handle them, as otherwise they would need to look in the regular target dir as well as the apk dir.This change make our Android release step, which currently produces ~2.4GiB of DWARF debug data, go from a ridiculous +3m30s (surpassing the time it actually takes the code to build!) to a more reasonable (though still not good) +17s to strip debug symbols and write the stripped binaries and other things to the APK.