Skip to content

Commit ad15aeb

Browse files
committed
Do not suggest make -j for building CPython. make -j means _no_ limit on
the number of concurrent jobs, not "a sensible limit considering the available memory and CPU cores". With LTO it's easy to run out of memory when too many jobs run at the same time.
1 parent 26de2ef commit ad15aeb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

developer-workflow/extension-modules.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,11 @@ Now that the configuration is in place, it remains to compile the project:
547547
548548
.. tip::
549549

550-
Use ``make -j`` to speed-up compilation by utilizing as many CPU cores
551-
as possible or ``make -jN`` to allow at most *N* concurrent jobs.
550+
Use ``make -jN`` to speed-up compilation by utilizing as many CPU cores
551+
as possible, where *N* is as many CPU cores you want to spare (and have
552+
memory for). Be careful using ``make -j`` with no argument, as this puts
553+
no limit on the number of jobs, and compilation can sometimes use up a
554+
lot of memory (like when building with LTO).
552555

553556
* ``make regen-configure`` updates the :cpy-file:`configure` script.
554557

index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ instructions please see the :ref:`setup guide <setup>`.
4343

4444
.. code-block:: shell
4545
46-
./configure --with-pydebug && make -j
46+
./configure --with-pydebug && make -j4
4747
4848
.. tab:: macOS
4949

5050
.. code-block:: shell
5151
52-
./configure --with-pydebug && make -j
52+
./configure --with-pydebug && make -j4
5353
5454
.. tab:: Windows
5555

0 commit comments

Comments
 (0)