Skip to content

Force annotation on all functions in both source and header files #654

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

Merged
merged 1 commit into from
Jan 3, 2021

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 3, 2021

Cherry picked from david-cattermole@d58c650. See #612 (comment).

Annotations for symbol visibility (such as __declspec(dllexport) and __attribute__((visibility("default")))) is the primary use case. Such annotations are expected to be needed on declarations (headers) only, however forcing the annotations into the header file only is causes missing symbols. Therefore the fix is to force the annotations into both declaration (header files) and definition (source files).

Annotations for symbol visibility (such as `__declspec(dllexport)` and
`__attribute__((visibility("default")))`) is the primary use case.
Such annotations are expected to be needed on declarations (headers)
only, however forcing the annotations into the header file only
is causes missing symbols. Therefore the fix is to force the
annotations into both declaration (header files) and definition
(source files).
@dtolnay dtolnay merged commit 4d04cf5 into master Jan 3, 2021
@dtolnay dtolnay deleted the symbol-visibility-revisit branch January 3, 2021 08:06
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