-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
gh-131842: Allow to pass custom CFLAGS and LDFLAGS to the compilation of builtin extension modules #131847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
346768b
to
3c0c367
Compare
Does someone has a better name for this flags? I don't like that we have |
0cc69ae
to
f936956
Compare
I live in the past. I need to move all of this to 3.14 🤦 |
You should add "needs backport to 3.13" label if you want to add this feature to Python 3.13. |
A terminology question: |
Agreed. See #131847 (comment) Any ideas of a better name? |
I suggest to reuse the "extra" term: |
4c459a4
to
2f61043
Compare
…lation of builtin extension modules Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
819d461
to
d0b2f28
Compare
I think this PR warrants more discussion. See my comment on the issue. |
Ok I answered in the issue let's move the discussion there #131842 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we use PY_STDMODULE_CFLAGS
for shared extension modules and PY_BUILTIN_MODULE_CFLAGS
for built-in extension modules. This PR is slightly confusing, since it adds extra {C,LD}FLAGS for built-in extension modules using naming similar to what we use for shared extension modules.
I think we should follow the existing naming scheme, and I also think we should consider introduce variables for both shared and built-in modules. Alternatively, we could use a more neutral name (for example PY_EXTRA_MODULE_*FLAGS
) and apply those to both shared and built-in extension modules.
|
||
.. envvar:: PY_EXTRA_STDMODULE_LDFLAGS | ||
|
||
Equivalent flag to :envvar:`LDLAGS_NODIST` but it only applies to **all** builtin extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equivalent flag to :envvar:`LDLAGS_NODIST` but it only applies to **all** builtin extension | |
Equivalent flag to :envvar:`LDFLAGS_NODIST` but it only applies to **all** builtin extension |
with :c:expr:`Py_NO_LINK_LIB`. (Contributed by Jean-Christophe | ||
Fillion-Robin in :gh:`82909`.) | ||
|
||
* Two new configure flags are added: :envvar:`CFLAGS_BUILTIN_MODULE` and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Two new configure flags are added: :envvar:`CFLAGS_BUILTIN_MODULE` and | |
* Two new configure flags are added: :envvar:`PY_EXTRA_STDMODULE_CFLAGS` and |
Fillion-Robin in :gh:`82909`.) | ||
|
||
* Two new configure flags are added: :envvar:`CFLAGS_BUILTIN_MODULE` and | ||
:envvar:`LDFLAGS_BUILTIN_MODULE`. These flags allows refistributors to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:envvar:`LDFLAGS_BUILTIN_MODULE`. These flags allows refistributors to | |
:envvar:`PY_EXTRA_STDMODULE_LDFLAGS`. These flags allows refistributors to |
📚 Documentation preview 📚: https://cpython-previews--131847.org.readthedocs.build/