perf: add release profile to reduce binary size (#328)
* perf: add release profile to reduce binary size Add workspace-level release profile with size optimizations: - opt-level = "z" (optimize for size) - lto = true (cross-crate link-time optimization) - codegen-units = 1 (better whole-program optimization) - strip = "debuginfo" (remove debug info, preserve C API symbols) Reduces .text section by ~32% (1.9 MiB → 1.3 MiB). The .a file grows due to LTO bitcode embedding, but the final linked binary (libflutter.so) will be smaller when the engine consumes it. * chore: add codegen and debuginfo to spell check dictionary
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
[workspace]
|
||||
members = ["library", "patch"]
|
||||
resolver = "2"
|
||||
|
||||
[profile.release]
|
||||
opt-level = "z"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = "debuginfo"
|
||||
|
||||
@@ -28,10 +28,12 @@ words:
|
||||
- cdylib
|
||||
- classpath
|
||||
- clippy
|
||||
- codegen
|
||||
- comde
|
||||
- compatch
|
||||
- Condvar
|
||||
- datadir
|
||||
- debuginfo
|
||||
- declspec
|
||||
- Decompressor
|
||||
- dllexport
|
||||
|
||||
Reference in New Issue
Block a user