mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
Document using nproc instead of hardcoded number of threads (#4476)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
@@ -104,6 +104,20 @@ A good rule of thumb for the ``-j`` (*jobs*) flag, is to have at least as many
|
||||
threads compiling Godot as you have cores in your CPU, if not one or two more.
|
||||
Feel free to add the ``-j`` option to any SCons command you see below.
|
||||
|
||||
You can automatically use all available CPU cores with command substitution.
|
||||
|
||||
On Linux, you can use ``nproc``:
|
||||
|
||||
::
|
||||
|
||||
scons -j$(nproc)
|
||||
|
||||
On \*BSD, you can use ``sysctl -n hw.ncpu``:
|
||||
|
||||
::
|
||||
|
||||
scons -j$(sysctl -n hw.ncpu)
|
||||
|
||||
.. note::
|
||||
|
||||
Prior to Godot 4.0, the Linux/\*BSD target was called ``x11`` instead of
|
||||
|
||||
Reference in New Issue
Block a user