Skip to content

fix #3367: Consolidate extern fn block for fn and static symbols#3371

Merged
emilio merged 1 commit into
rust-lang:mainfrom
alejnp:feature/consolidate-extern-fn-block-attrs
Jul 7, 2026
Merged

fix #3367: Consolidate extern fn block for fn and static symbols#3371
emilio merged 1 commit into
rust-lang:mainfrom
alejnp:feature/consolidate-extern-fn-block-attrs

Conversation

@alejnp

@alejnp alejnp commented May 11, 2026

Copy link
Copy Markdown
Contributor

This PR attempts at consolidating the previously available annotation mechanism, extern-fn-attrs, to also affect static variable symbols. See #3367 for more context.

As part of the PR, I've:

  • Added logic to push attributes to static variables, in an approach similar to feat: Implement support for link type 'raw-dylib' on Windows #3257.
  • Added tests or refactored existing tests for this functionality.
  • Renamed the flag in both the internal structure (BindgenFlags) as well as in the CLI mapping.
  • Renamed the files of the tests affected by these changes.

Please, let me know if I've missed something and I'll be making the changes.

@alejnp

alejnp commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

r? @emilio @pvdrz

@alejnp

alejnp commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

@emilio Sorry to bother, but any chance this could be reviewed?

@alejnp

alejnp commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@emilio @pvdrz Could anyone of you provide some guidance if this is a good solution, or if there's any actionable on my end?

@emilio emilio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, sorry for the lag here.

View changes since this review

@emilio emilio added this pull request to the merge queue Jul 7, 2026
Merged via the queue into rust-lang:main with commit 8028f22 Jul 7, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants