Document using nproc instead of hardcoded number of threads (#4476)

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
Enhex
2020-12-24 14:49:02 +01:00
committed by GitHub
co-authored by Hugo Locurcio
parent 5b4fae0dc1
commit 5cfdce49ab
@@ -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