@@ -60,7 +60,7 @@ See also :pep:`7` "Style Guide for C Code" and :pep:`11` "CPython platform
60
60
support".
61
61
62
62
63
- Generated files
63
+ Generated Files
64
64
===============
65
65
66
66
To reduce build dependencies, Python source code contains multiple generated
@@ -289,6 +289,136 @@ General Options
289
289
290
290
.. versionadded :: 3.13
291
291
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
+
292
422
WebAssembly Options
293
423
-------------------
294
424
@@ -355,7 +485,7 @@ Install Options
355
485
.. versionadded :: 3.6
356
486
357
487
358
- Performance options
488
+ Performance Options
359
489
-------------------
360
490
361
491
Configuring Python using ``--enable-optimizations --with-lto `` (PGO + LTO) is
@@ -428,6 +558,19 @@ also be used to improve performance.
428
558
429
559
.. versionadded :: 3.12
430
560
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
+
431
574
.. cmdoption :: --with-computed-gotos
432
575
433
576
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
506
649
:option: `--with-trace-refs ` option).
507
650
508
651
509
- Debug options
652
+ Debug Options
510
653
-------------
511
654
512
655
.. cmdoption :: --with-pydebug
@@ -581,7 +724,7 @@ Debug options
581
724
.. versionadded :: 3.6
582
725
583
726
584
- Linker options
727
+ Linker Options
585
728
--------------
586
729
587
730
.. cmdoption :: --enable-shared
@@ -596,7 +739,7 @@ Linker options
596
739
.. versionadded :: 3.10
597
740
598
741
599
- Libraries options
742
+ Libraries Options
600
743
-----------------
601
744
602
745
.. cmdoption :: --with-libs='lib1 ...'
@@ -775,6 +918,10 @@ the version of the cross compiled host Python.
775
918
ac_cv_file__dev_ptmx=yes
776
919
ac_cv_file__dev_ptc=no
777
920
921
+ .. cmdoption :: HOSTRUNNER
922
+
923
+ Program to run CPython for the host platform for cross-compilation.
924
+
778
925
779
926
Cross compiling example::
780
927
@@ -787,7 +934,7 @@ Cross compiling example::
787
934
Python Build System
788
935
===================
789
936
790
- Main files of the build system
937
+ Main Files Of The Build System
791
938
------------------------------
792
939
793
940
* :file: `configure.ac ` => :file: `configure `;
@@ -796,7 +943,7 @@ Main files of the build system
796
943
* :file: `Modules/Setup `: C extensions built by the Makefile using
797
944
:file: `Module/makesetup ` shell script;
798
945
799
- Main build steps
946
+ Main Build Steps
800
947
----------------
801
948
802
949
* C files (``.c ``) are built as object files (``.o ``).
@@ -805,7 +952,7 @@ Main build steps
805
952
final ``python `` program.
806
953
* C extensions are built by the Makefile (see :file: `Modules/Setup `).
807
954
808
- Main Makefile targets
955
+ Main Makefile Targets
809
956
---------------------
810
957
811
958
* ``make ``: Build Python with the standard library.
@@ -826,7 +973,7 @@ Main Makefile targets
826
973
* ``make distclean ``: Same than ``make clean ``, but remove also files created
827
974
by the configure script.
828
975
829
- C extensions
976
+ C Extensions
830
977
------------
831
978
832
979
Some 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,
867
1014
causing an :exc: `ImportError ` on import.
868
1015
869
1016
870
- Compiler and linker flags
1017
+ Compiler and Linker Flags
871
1018
=========================
872
1019
873
1020
Options set by the ``./configure `` script and environment variables and used by
874
1021
``Makefile ``.
875
1022
876
- Preprocessor flags
1023
+ Preprocessor Flags
877
1024
------------------
878
1025
879
1026
.. envvar :: CONFIGURE_CPPFLAGS
@@ -903,7 +1050,7 @@ Preprocessor flags
903
1050
904
1051
.. versionadded :: 3.2
905
1052
906
- Compiler flags
1053
+ Compiler Flags
907
1054
--------------
908
1055
909
1056
.. envvar :: CC
@@ -1033,7 +1180,7 @@ Compiler flags
1033
1180
Default: empty string (not used).
1034
1181
1035
1182
1036
- Linker flags
1183
+ Linker Flags
1037
1184
------------
1038
1185
1039
1186
.. envvar :: LINKCC
0 commit comments