-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improved
strip
config handling (#22)
Usually in rust you can set `strip=true` or `strip="symbols"` in your Cargo.toml. This doesn't work for Vita, since it strips the relocation information from the `elf`, which causes `vita-elf-create` to fail. Previously we had an additional vita-specific `strip` step configurable via `Cargo.toml`. This PR changes the behavior in the following way: 1. Before calling `cargo build` it now does an additional `cargo build ... -Z unstable-options --unit-graph`. This unstable option does a dry-run of the build emitting a JSON with a graph. This JSON is parsed to check if symbol stripping was enabled, and if the build failed AND we stripping was detected, `cargo-vita` now emits a sensible warning, improving the devx. Since this cargo feature is unstable (for 4 years already), if it fails, the output is ignored and does NOT fail the build. 2. The additional stripping pass is now configurable separately for dev and release builds, being enabled for release builds by default. This pass always uses `--strip-unneeded` which does not break `vita-elf-create` and still yields smaller binaries. 3. Updated the readme to reflect these changes
- Loading branch information
Showing
5 changed files
with
241 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.