Skip to content

gh-136677: Introduce executable specific linker flags to configure #137296

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rueteh
Copy link

@rueteh rueteh commented Aug 1, 2025

Introduce two new flags EXE_LDFLAGS and PY_CORE_EXE_LDFLAGS to contain executable target specific linker options for building the python interpreter as well as other executables.

Notes

If provided, this effectively means that PY_CORE_LDFLAGS (as well as the chain of flags used by this variable) is exclusively used to build shared libraries / bundles. In addition, any common linker flags applicable to both types of targets would also need to be supplied to EXE_LDFLAGS and LDFLAGS.


📚 Documentation preview 📚: https://cpython-previews--137296.org.readthedocs.build/

rueteh added 3 commits July 20, 2025 23:33
Add PY_CORE_EXE_LDFLAGS and EXE_LDFLAGS which stores executable specific
LDFLAGS, replacing PY_CORE_LDFLAGS for building
executable targets.

If PY_CORE_EXE_LDFLAGS / EXE_LDFLAGS is not provided, then it defaults
to the value of PY_CORE_LDFLAGS which is the existing behaviour.

If both flags are supplied, and there is a need
to distinguish between executable and shared specific LDFLAGS,
in particular, PY_CORE_LDFLAGS should contain the shared specific LDFLAGS.
@python-cla-bot
Copy link

python-cla-bot bot commented Aug 1, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@rueteh rueteh marked this pull request as ready for review August 1, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant