Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork249
Try a theory in CI: -fvisibility=hidden doesn't do anything#735
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
geofft wants to merge1 commit intoastral-sh:mainChoose a base branch fromgeofft:hidden
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
What matters is -Wl,--exclude-libs=ALL for all of our shared objects, ofwhich in the current commit there is only python and libpython, whichalready uses it.
geofft added a commit that referenced this pull requestAug 8, 2025
In general, if libX.so depends on libY.a, we don't want libY's symbolsdynamically exported by libX. We want libX's use of libY to be private.We use two mechanisms for making this happen. -fvisibility=hidden, whichworks on the build of libY to mark the symbols themselves as hidden inthe object file, and -Wl,--exclude-libs=ALL, which works on the build oflibX to instruct the linker not to re-export symbols from staticlibraries.We set -fvisibility=hidden on some platforms but not all. We use-Wl,--exclude-libs=ALL on the build of Python itself on all platforms,which up to this point built our only dynamic objects (bin/python andlibpython). Now that libtcl and libtk are dynamic, we need to do thesame thing.I'm not sure if -fvisibility=hidden actually does anything useful forus, given the use of -Wl,--exclude-libs=ALL, and I think the fact thatit's only set on some platforms is an oversight and demonstrates thatit's not needed. See#735, which removes it; the builds pass vaildation.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
platform:darwinSpecific to the macOS platform platform:linuxSpecific to the Linux platform python:3.9python:3.13
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What matters is -Wl,--exclude-libs=ALL for all of our shared objects, of which in the current commit there is only python and libpython, which already uses it.