mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Update SCons link-time optimization option for 3.5 and later
This commit is contained in:
@@ -151,7 +151,7 @@ dependencies. Running it will bring up the Project Manager.
|
|||||||
SCons option ``target=release_debug``.
|
SCons option ``target=release_debug``.
|
||||||
|
|
||||||
If you are compiling Godot with MinGW, you can make the binary
|
If you are compiling Godot with MinGW, you can make the binary
|
||||||
even smaller and faster by adding the SCons option ``use_lto=yes``.
|
even smaller and faster by adding the SCons option ``lto=full``.
|
||||||
As link-time optimization is a memory-intensive process,
|
As link-time optimization is a memory-intensive process,
|
||||||
this will require about 7 GB of available RAM while compiling.
|
this will require about 7 GB of available RAM while compiling.
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ manager.
|
|||||||
SCons option ``target=release_debug``.
|
SCons option ``target=release_debug``.
|
||||||
|
|
||||||
If you are compiling Godot with GCC, you can make the binary
|
If you are compiling Godot with GCC, you can make the binary
|
||||||
even smaller and faster by adding the SCons option ``use_lto=yes``.
|
even smaller and faster by adding the SCons option ``lto=full``.
|
||||||
As link-time optimization is a memory-intensive process,
|
As link-time optimization is a memory-intensive process,
|
||||||
this will require about 7 GB of available RAM while compiling.
|
this will require about 7 GB of available RAM while compiling.
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ and MSVC compilers:
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
scons p=windows target=release tools=no use_lto=yes
|
scons p=windows target=release tools=no lto=full
|
||||||
|
|
||||||
Linking becomes much slower and more RAM-consuming with this option,
|
Linking becomes much slower and more RAM-consuming with this option,
|
||||||
so it should be used only for release builds:
|
so it should be used only for release builds:
|
||||||
|
|||||||
@@ -29,13 +29,8 @@ To get useful profiling information, it is **absolutely required** to use a Godo
|
|||||||
build that includes debugging symbols. Official binaries do not include debugging
|
build that includes debugging symbols. Official binaries do not include debugging
|
||||||
symbols, since these would make the download size significantly larger.
|
symbols, since these would make the download size significantly larger.
|
||||||
|
|
||||||
To get profiling data that best matches the production environment, you should
|
To get profiling data that best matches the production environment (but with debugging symbols),
|
||||||
compile binaries with the following SCons options:
|
you should compile binaries with the ``production=yes debug_symbols=yes`` SCons options.
|
||||||
|
|
||||||
- For editor binaries: ``target=release_debug use_lto=yes``
|
|
||||||
- For debug export templates: ``target=release_debug use_lto=yes``
|
|
||||||
- For release export templates: ``tools=no target=release debug_symbols=yes``
|
|
||||||
- ``debug_symbols=yes`` is required as export templates are stripped from debugging symbols by default.
|
|
||||||
|
|
||||||
It is possible to run a profiler on less optimized builds (e.g. ``target=debug`` without LTO),
|
It is possible to run a profiler on less optimized builds (e.g. ``target=debug`` without LTO),
|
||||||
but results will naturally be less representative of real world conditions.
|
but results will naturally be less representative of real world conditions.
|
||||||
|
|||||||
Reference in New Issue
Block a user