Skip to content

Add linkage attribute to (non-gnu89) inline functions #116

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 3 commits into from
Jun 25, 2019

Conversation

thedataking
Copy link
Contributor

This change was prompted by a linker error in bzip2. Using the linkage feature and adding the #[linkage = "external"] attribute to inlined Rust functions (translated from non-gnu89 inlined extern functions) avoids the linker issue. This due to the way rustc handles functions with explicit linkage (see mono.rs).

After additional testing, it does not seem necessary to add a #[linkage = "internal"] attribute on static inlined functions.

@thedataking thedataking requested a review from TheDan64 June 20, 2019 23:38
@thedataking thedataking added the bug Something isn't working label Jun 21, 2019
@thedataking thedataking merged commit 1608ac6 into master Jun 25, 2019
@thedataking thedataking deleted the feature/inlining_explicit_linkage branch June 25, 2019 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants