@@ -60,7 +60,7 @@ See also :pep:`7` "Style Guide for C Code" and :pep:`11` "CPython platform
6060support".
6161
6262
63- Generated files
63+ Generated Files
6464===============
6565
6666To reduce build dependencies, Python source code contains multiple generated
@@ -289,6 +289,136 @@ General Options
289289
290290 .. versionadded :: 3.13
291291
292+ .. cmdoption :: PKG_CONFIG
293+
294+ Path to ``pkg-config `` utility.
295+
296+ .. cmdoption :: PKG_CONFIG_LIBDIR
297+ .. cmdoption :: PKG_CONFIG_PATH
298+
299+ ``pkg-config `` options.
300+
301+
302+ C Compiler Options
303+ ------------------
304+
305+ .. cmdoption :: CC
306+
307+ C compiler command.
308+
309+ .. cmdoption :: CFLAGS
310+
311+ C compiler flags.
312+
313+ .. cmdoption :: CPP
314+
315+ C preprocessor command.
316+
317+ .. cmdoption :: CPPFLAGS
318+
319+ C preprocessor flags, e.g. ``-I<include dir> ``.
320+
321+
322+ Linker Options
323+ --------------
324+
325+ .. cmdoption :: LDFLAGS
326+
327+ Linker flags, e.g. ``-L<library directory> ``.
328+
329+ .. cmdoption :: LIBS
330+
331+ Libraries to pass to the linker, e.g. ``-l<library> ``.
332+
333+ .. cmdoption :: MACHDEP
334+
335+ Name for machine-dependent library files.
336+
337+
338+ Options For Third-Party Dependencies
339+ ------------------------------------
340+
341+ .. versionadded :: 3.11
342+
343+ .. cmdoption :: BZIP2_CFLAGS
344+ .. cmdoption :: BZIP2_LIBS
345+
346+ C compiler and linker flags to link Python to ``libbz2 ``, used by :mod: `bz2 `
347+ module, overriding ``pkg-config ``.
348+
349+ .. cmdoption :: CURSES_CFLAGS
350+ .. cmdoption :: CURSES_LIBS
351+
352+ C compiler and linker flags for ``libncurses `` or ``libncursesw ``, used by
353+ :mod: `curses ` module, overriding ``pkg-config ``.
354+
355+ .. cmdoption :: GDBM_CFLAGS
356+ .. cmdoption :: GDBM_LIBS
357+
358+ C compiler and linker flags for ``gdbm ``.
359+
360+ .. cmdoption :: LIBB2_CFLAGS
361+ .. cmdoption :: LIBB2_LIBS
362+
363+ C compiler and linker flags for ``libb2 `` (:ref: `BLAKE2 <hashlib-blake2 >`),
364+ used by :mod: `hashlib ` module, overriding ``pkg-config ``.
365+
366+ .. cmdoption :: LIBEDIT_CFLAGS
367+ .. cmdoption :: LIBEDIT_LIBS
368+
369+ C compiler and linker flags for ``libedit ``, used by :mod: `readline ` module,
370+ overriding ``pkg-config ``.
371+
372+ .. cmdoption :: LIBFFI_CFLAGS
373+ .. cmdoption :: LIBFFI_LIBS
374+
375+ C compiler and linker flags for ``libffi ``, used by :mod: `ctypes ` module,
376+ overriding ``pkg-config ``.
377+
378+ .. cmdoption :: LIBLZMA_CFLAGS
379+ .. cmdoption :: LIBLZMA_LIBS
380+
381+ C compiler and linker flags for ``liblzma ``, used by :mod: `lzma ` module,
382+ overriding ``pkg-config ``.
383+
384+ .. cmdoption :: LIBREADLINE_CFLAGS
385+ .. cmdoption :: LIBREADLINE_LIBS
386+
387+ C compiler and linker flags for ``libreadline ``, used by :mod: `readline `
388+ module, overriding ``pkg-config ``.
389+
390+ .. cmdoption :: LIBSQLITE3_CFLAGS
391+ .. cmdoption :: LIBSQLITE3_LIBS
392+
393+ C compiler and linker flags for ``libsqlite3 ``, used by :mod: `sqlite3 `
394+ module, overriding ``pkg-config ``.
395+
396+ .. cmdoption :: LIBUUID_CFLAGS
397+ .. cmdoption :: LIBUUID_LIBS
398+
399+ C compiler and linker flags for ``liuuid ``, used by :mod: `uuid ` module,
400+ overriding ``pkg-config ``.
401+
402+ .. cmdoption :: PANEL_CFLAGS
403+ .. cmdoption :: PANEL_LIBS
404+
405+ C compiler and Linker flags for PANEL, overriding ``pkg-config ``.
406+
407+ C compiler and linker flags for ``libpanel `` or ``libpanelw ``, used by
408+ :mod: `curses.panel ` module, overriding ``pkg-config ``.
409+
410+ .. cmdoption :: TCLTK_CFLAGS
411+ .. cmdoption :: TCLTK_LIBS
412+
413+ C compiler and linker flags for TCLTK, overriding ``pkg-config ``.
414+
415+ .. cmdoption :: ZLIB_CFLAGS
416+ .. cmdoption :: ZLIB_LIBS
417+
418+ C compiler and linker flags for ``libzlib ``, used by :mod: `gzip ` module,
419+ overriding ``pkg-config ``.
420+
421+
292422WebAssembly Options
293423-------------------
294424
@@ -355,7 +485,7 @@ Install Options
355485 .. versionadded :: 3.6
356486
357487
358- Performance options
488+ Performance Options
359489-------------------
360490
361491Configuring Python using ``--enable-optimizations --with-lto `` (PGO + LTO) is
@@ -428,6 +558,19 @@ also be used to improve performance.
428558
429559 .. versionadded :: 3.12
430560
561+ .. cmdoption :: BOLT_APPLY_FLAGS
562+
563+ Arguments to ``llvm-bolt `` when creating a `BOLT optimized binary
564+ <https://github.com/facebookarchive/BOLT> `_.
565+
566+ .. versionadded :: 3.12
567+
568+ .. cmdoption :: BOLT_INSTRUMENT_FLAGS
569+
570+ Arguments to ``llvm-bolt `` when instrumenting binaries.
571+
572+ .. versionadded :: 3.12
573+
431574.. cmdoption :: --with-computed-gotos
432575
433576 Enable computed gotos in evaluation loop (enabled by default on supported
@@ -506,7 +649,7 @@ See also the :ref:`Python Development Mode <devmode>` and the
506649 :option: `--with-trace-refs ` option).
507650
508651
509- Debug options
652+ Debug Options
510653-------------
511654
512655.. cmdoption :: --with-pydebug
@@ -581,7 +724,7 @@ Debug options
581724 .. versionadded :: 3.6
582725
583726
584- Linker options
727+ Linker Options
585728--------------
586729
587730.. cmdoption :: --enable-shared
@@ -596,7 +739,7 @@ Linker options
596739 .. versionadded :: 3.10
597740
598741
599- Libraries options
742+ Libraries Options
600743-----------------
601744
602745.. cmdoption :: --with-libs='lib1 ...'
@@ -775,6 +918,10 @@ the version of the cross compiled host Python.
775918 ac_cv_file__dev_ptmx=yes
776919 ac_cv_file__dev_ptc=no
777920
921+ .. cmdoption :: HOSTRUNNER
922+
923+ Program to run CPython for the host platform for cross-compilation.
924+
778925
779926Cross compiling example::
780927
@@ -787,7 +934,7 @@ Cross compiling example::
787934Python Build System
788935===================
789936
790- Main files of the build system
937+ Main Files Of The Build System
791938------------------------------
792939
793940* :file: `configure.ac ` => :file: `configure `;
@@ -796,7 +943,7 @@ Main files of the build system
796943* :file: `Modules/Setup `: C extensions built by the Makefile using
797944 :file: `Module/makesetup ` shell script;
798945
799- Main build steps
946+ Main Build Steps
800947----------------
801948
802949* C files (``.c ``) are built as object files (``.o ``).
@@ -805,7 +952,7 @@ Main build steps
805952 final ``python `` program.
806953* C extensions are built by the Makefile (see :file: `Modules/Setup `).
807954
808- Main Makefile targets
955+ Main Makefile Targets
809956---------------------
810957
811958* ``make ``: Build Python with the standard library.
@@ -826,7 +973,7 @@ Main Makefile targets
826973* ``make distclean ``: Same than ``make clean ``, but remove also files created
827974 by the configure script.
828975
829- C extensions
976+ C Extensions
830977------------
831978
832979Some C extensions are built as built-in modules, like the ``sys `` module.
@@ -867,13 +1014,13 @@ built as a shared library, its ``PyInit_xxx()`` function is not exported,
8671014causing an :exc: `ImportError ` on import.
8681015
8691016
870- Compiler and linker flags
1017+ Compiler and Linker Flags
8711018=========================
8721019
8731020Options set by the ``./configure `` script and environment variables and used by
8741021``Makefile ``.
8751022
876- Preprocessor flags
1023+ Preprocessor Flags
8771024------------------
8781025
8791026.. envvar :: CONFIGURE_CPPFLAGS
@@ -903,7 +1050,7 @@ Preprocessor flags
9031050
9041051 .. versionadded :: 3.2
9051052
906- Compiler flags
1053+ Compiler Flags
9071054--------------
9081055
9091056.. envvar :: CC
@@ -1033,7 +1180,7 @@ Compiler flags
10331180 Default: empty string (not used).
10341181
10351182
1036- Linker flags
1183+ Linker Flags
10371184------------
10381185
10391186.. envvar :: LINKCC
0 commit comments