Merge pull request #7478 from lawnjelly/scu_build_master

SCU (single compilation unit) build docs
This commit is contained in:
Rémi Verschelde
2023-06-08 19:43:33 +02:00
committed by GitHub
@@ -365,6 +365,27 @@ aforementioned ``-j`` option for all future builds:
$env:SCONSFLAGS="-j4"
SCU (single compilation unit) build
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Regular builds tend to be bottlenecked by including large numbers of headers
in each compilation translation unit. Primarily to speed up development (rather
than for production builds), Godot offers a "single compilation unit" build
(aka "Unity / Jumbo" build).
For the folders accelerated by this option, multiple ``.cpp`` files are
compiled in each translation unit, so headers can be shared between multiple
files, which can dramatically decrease build times.
To make a SCU build, use the ``scu_build=yes`` SCons option.
.. note:: When developing a Pull Request using SCU builds, be sure to make a
regular build prior to submitting the PR. This is because SCU builds
by nature include headers from earlier ``.cpp`` files in the
translation unit, therefore won't catch all the includes you will
need in a regular build. The CI will catch these errors but it will
usually be faster to catch them on a local build on your machine.
Export templates
----------------