Skip to content

flutter engine binary size increased threefold in 3.32 #181983

Description

@martinetd

Steps to reproduce

  1. build flutter engine for linux host:
./flutter/tools/gn --runtime-mode debug --unoptimized --embedder-for-target --disable-desktop-e
mbeddings --no-build-embedder-examples --enable-fontconfig --no-goma
ninja -C out/host_debug_unopt
  1. observe libflutter_engine.so size

Expected results

3.29.3 size:

output-cf56914b32/elinux-arm64-debug.zip
 83138488  2026-01-27 15:45   libflutter_engine.so
output-cf56914b32/elinux-arm64-profile.zip
 19034848  2026-01-27 15:45   libflutter_engine.so
output-cf56914b32/elinux-arm64-release.zip
 14328472  2026-01-27 15:45   libflutter_engine.so
output-cf56914b32/elinux-x64-debug.zip
 84000816  2026-01-27 15:45   libflutter_engine.so
output-cf56914b32/elinux-x64-profile.zip
 20180120  2026-01-27 15:45   libflutter_engine.so
output-cf56914b32/elinux-x64-release.zip
 15460712  2026-01-27 15:45   libflutter_engine.so

Actual results

3.32.6 size

output-72f2b18bb0/elinux-arm64-debug.zip
385555440  2026-01-28 18:25   libflutter_engine.so
output-72f2b18bb0/elinux-arm64-profile.zip
 53268200  2026-01-28 18:25   libflutter_engine.so
output-72f2b18bb0/elinux-arm64-release.zip
 43138224  2026-01-28 18:25   libflutter_engine.so
output-72f2b18bb0/elinux-x64-debug.zip
381289080  2026-01-28 18:25   libflutter_engine.so
output-72f2b18bb0/elinux-x64-profile.zip
 52557792  2026-01-28 18:25   libflutter_engine.so
output-72f2b18bb0/elinux-x64-release.zip
 42605904  2026-01-28 18:25   libflutter_engine.so

Since there is nowhere to write analysis I'll add it here.
This changed in #161546 that tried to make gn stripped option "dynamic", not stripping for android and stripping for other, but the check was never used because parser store_true default value is False and not None

The PR is trivial and will follow, but if it was meant to disable stripping everywhere then the else case should be removed and help fixed.

Code sample

not relevant

Screenshots or Video

not relevant

Logs

not relevant

Flutter Doctor output

not relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions