Skip to content

Commit

Permalink
Document using nproc instead of hardcoded number of threads (#4476)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
  • Loading branch information
Enhex and Calinou authored Dec 24, 2020
1 parent 5b4fae0 commit 5cfdce4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions development/compiling/compiling_for_linuxbsd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cfdce4

Please sign in to comment.