-
Notifications
You must be signed in to change notification settings - Fork 9
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
enable size optimization #16
Comments
Enable Size OptimizationAdjust opt-levelIf you want your release binaries to be optimized for size then change the
Note: FlagsThis
ResultsBased on commit id:
Use stripUse the strip tool to remove symbols and/or sections.
Not much effect has been seen on release build binaries. Enable LTOThe To enable, change the
Valid Options
ResultsBased on commit id:
Disable stack unwinding upon panicThis option lets you control what happens when the code panics. To disable stack unwinding, change the
Options
If not specified, the default depends on the target. ResultNot much effect has been seen on release build binaries. Adjust codegen-unitsThis codegen-units flag controls how many code generation units the crate is split into. It takes an integer greater than 0. When a crate is split into multiple codegen units, LLVM is able to process them in parallel. Increasing parallelism may speed up compile times, but may also produce slower code. Setting this to 1 may improve the performance of generated code, but may be slower to compile. The default value, if not specified, is 16 for non-incremental builds. For incremental builds the default is 256 which allows caching to be more granular. To limit the number of codegen-units to 1, change the
ResultsBased on commit id:
Minimize DependenciesRemove Unnecessary Dependencies
Disable Unnecessary FeaturesReferences[1] https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html |
Related to #16. Signed-off-by: Kailun Qin <[email protected]>
ref: https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html
The text was updated successfully, but these errors were encountered: