Skip to content

Use Default visibility for rustc-generated C symbol declarations#131519

Merged
bors merged 1 commit intorust-lang:masterfrom
davidlattimore:intrinsics-default-vis
Oct 11, 2024
Merged

Use Default visibility for rustc-generated C symbol declarations#131519
bors merged 1 commit intorust-lang:masterfrom
davidlattimore:intrinsics-default-vis

Conversation

@davidlattimore
Copy link
Contributor

Non-default visibilities should only be used for definitions, not declarations, otherwise linking can fail.

This is based on #123994.

Issue #123427

When I changed default-hidden-visibility to default-visibility in #130005, I updated all places in the code that used default-hidden-visibility, replicating the hidden-visibility bug to also happen for protected visibility.

Without this change, trying to build rustc with -Z default-visibility=protected fails with a link error.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants