gh-131842: Allow to pass custom CFLAGS and LDFLAGS to the compilation of builtin extension modules#131847
gh-131842: Allow to pass custom CFLAGS and LDFLAGS to the compilation of builtin extension modules#131847pablogsal wants to merge 1 commit intopython:mainfrom
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.
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.
| 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.
| * 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.
| :envvar:`LDFLAGS_BUILTIN_MODULE`. These flags allows refistributors to | |
| :envvar:`PY_EXTRA_STDMODULE_LDFLAGS`. These flags allows refistributors to |
|
This PR is stale because it has been open for 30 days with no activity. |
📚 Documentation preview 📚: https://cpython-previews--131847.org.readthedocs.build/