Skip to content

Commit cfaa7c7

Browse files
authored
Merge pull request godotengine#7478 from lawnjelly/scu_build_master
SCU (single compilation unit) build docs
2 parents 5a0916e + a2fd3fd commit cfaa7c7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

contributing/development/compiling/introduction_to_the_buildsystem.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,27 @@ aforementioned ``-j`` option for all future builds:
365365

366366
$env:SCONSFLAGS="-j4"
367367

368+
SCU (single compilation unit) build
369+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
370+
371+
Regular builds tend to be bottlenecked by including large numbers of headers
372+
in each compilation translation unit. Primarily to speed up development (rather
373+
than for production builds), Godot offers a "single compilation unit" build
374+
(aka "Unity / Jumbo" build).
375+
376+
For the folders accelerated by this option, multiple ``.cpp`` files are
377+
compiled in each translation unit, so headers can be shared between multiple
378+
files, which can dramatically decrease build times.
379+
380+
To make a SCU build, use the ``scu_build=yes`` SCons option.
381+
382+
.. note:: When developing a Pull Request using SCU builds, be sure to make a
383+
regular build prior to submitting the PR. This is because SCU builds
384+
by nature include headers from earlier ``.cpp`` files in the
385+
translation unit, therefore won't catch all the includes you will
386+
need in a regular build. The CI will catch these errors but it will
387+
usually be faster to catch them on a local build on your machine.
388+
368389
Export templates
369390
----------------
370391

0 commit comments

Comments
 (0)