Browse Source

Document `optimize=size_extra` SCons option (#10845)

* Document `optimize=size_extra` SCons option

* Remove `optimize=size_extra` version note

Co-authored-by: A Thousand Ships <[email protected]>

---------

Co-authored-by: A Thousand Ships <[email protected]>
ProgrammerOnCoffee 3 months ago
parent
commit
ed79f7b7fd

+ 2 - 0
contributing/development/compiling/introduction_to_the_buildsystem.rst

@@ -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``.

+ 6 - 0
contributing/development/compiling/optimizing_for_size.rst

@@ -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
 ------------------------------