Skip to content

Document optimize=size_extra SCons option #10845

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ Several compiler optimization levels can be chosen from:
optimizations available.
- ``optimize=size`` *(default when targeting the Web platform)*: Favors small
binaries at the cost of slower execution speed.
- ``optimize=size_extra``: Favors even smaller binaries, at the cost of even
slower execution speed compared to ``optimize=size``.
- ``optimize=debug``: Only enables optimizations that do not impact debugging in
any way. This results in faster binaries than ``optimize=none``, but slower
binaries than ``optimize=speed_trace``.
Expand Down
6 changes: 6 additions & 0 deletions contributing/development/compiling/optimizing_for_size.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ To enable this, set the ``optimize`` flag to ``size``:

Some platforms such as WebAssembly already use this mode by default.

Godot 4.5 introduced the ``size_extra`` option, which can further reduce size.

::

scons target=template_release optimize=size_extra

Disabling advanced text server
------------------------------

Expand Down
Loading