bpo-43774: Document the Python Build System#25302
bpo-43774: Document the Python Build System#25302vstinner merged 2 commits intopython:masterfrom vstinner:configure_pgo_lto
Conversation
* Elaborate PGO and LTO documentaton. * Document MAINCC, PURIFY and LINKCC variables.
Doc/using/configure.rst
Outdated
| (disabled by default). | ||
|
|
||
| The C compiler ``clang`` requires ``llvm-profdata`` program for PGO. On | ||
| macOS, GCC also requires it: GCC is just an alis to clang on macOS. |
There was a problem hiding this comment.
nit: alias
nit: Clang
There was a problem hiding this comment.
"Clang": oh no, I beg you pardon! It's now fixed :-D
Doc/using/configure.rst
Outdated
|
|
||
| Enable Link Time Optimization (LTO) in any build (disabled by default). | ||
|
|
||
| The C compiler ``clang`` requires ``llvm-av`` for LTO. |
There was a problem hiding this comment.
- as well as an LTO-aware linker (ld.gold or lld)
| * ``python.o`` and the static ``libpython`` library are linked into the | ||
| final ``python`` program. | ||
| * C extensions are built by the Makefile (see :file:`Modules/Setup`) | ||
| and ``python setup.py build``. |
There was a problem hiding this comment.
Maybe document the various symlink created ? (like python3.x)
Doc/using/configure.rst
Outdated
| * ``make platform:``: build the ``python`` program, but don't build the | ||
| standard library extension modules. | ||
| * ``make profile-opt``: build Python using Profile Guided Optimization (PGO). | ||
| You can use the configure :option:`--enable-optimizations` option to use |
There was a problem hiding this comment.
nit: You can use the configure :option:--enable-optimizations option to make this the default of the make command.
Doc/using/configure.rst
Outdated
| At the beginning of the files, C extensions are built as built-in modules. | ||
| Extensions defined after the ``*shared*`` marker are built as dynamic libraries. | ||
|
|
||
| The :file:`setup.py` script only build C extensions as shared libraries using |
Doc/using/configure.rst
Outdated
| C compiler command used to build the ``main()`` function of programs like | ||
| ``python``. | ||
|
|
||
| Variable set by the :option:`--with-cxx-main` option. |
There was a problem hiding this comment.
of the configure script?
|
|
||
| .. envvar:: PURIFY | ||
|
|
||
| Purify command. Purify is a memory debugger program. |
There was a problem hiding this comment.
maybe add a link to the official purify website (looks like a closed source tool, right?)
There was a problem hiding this comment.
I found https://en.wikipedia.org/wiki/PurifyPlus but I'm not sure if it's this software. In case of doubt, I prefer to omit it.
Yeah, it's closed source. GCC and Clang have now great open source implementations (ASAN, UBSAN, etc.) supported by Python, see the Debug Options in this document.
|
@serge-sans-paille: PR updated to address your review. |
|
Thanks for the review @serge-sans-paille! I merged my PR. I plan to send an email to python-dev to get a wider review, once the doc will be online at docs.python.org. |
|
is this cording are right ??
canyou tell e is this are open source cords or yu guys kame it ?
…On Fri, Apr 9, 2021 at 8:40 PM Victor Stinner ***@***.***> wrote:
Thanks for the review @serge-sans-paille
<https://github.com/serge-sans-paille>! I merged my PR. I plan to send an
email to python-dev to get a wider review, once the doc will be online at
docs.python.org.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25302 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARHRQM5T5DN5PWYUIBQNZATTH3YTPANCNFSM42U2S45A>
.
|
https://bugs.python.org/issue43774