Skip to content
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

Ensure main() always has external linkage #48541

Merged
merged 1 commit into from
Feb 28, 2018
Merged

Conversation

varkor
Copy link
Member

@varkor varkor commented Feb 25, 2018

This ensures that the entry function is never elided due to inlining, even with inline(always). Fixes #47783.

There were a couple of possible ways of addressing this issue; I simply picked the one that seemed most direct. A warning could be appropriate, but considering using inlining hints in other places it doesn't apply also throws no warnings, and it seems like an edge case anyway, I haven't added one for now.

This ensures that the entry function is never elided due to inlining, even with `inline(always)`. Fixes rust-lang#47783.

There were a couple of possible ways of addressing this issue; I simply picked the one that seemed most direct. A warning could be appropriate, but considering using inlining hints in other places it doesn't apply also throws no warnings, and it seems like an edge case anyway, I haven't added one for now.
@rust-highfive
Copy link
Collaborator

r? @michaelwoerister

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 25, 2018
@michaelwoerister
Copy link
Member

Thanks for the PR, @varkor! Seems fine to do it that way.

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 26, 2018

📌 Commit 2466644 has been approved by michaelwoerister

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Feb 27, 2018
…ster

Ensure main() always has external linkage

This ensures that the entry function is never elided due to inlining, even with `inline(always)`. Fixes rust-lang#47783.

There were a couple of possible ways of addressing this issue; I simply picked the one that seemed most direct. A warning could be appropriate, but considering using inlining hints in other places it doesn't apply also throws no warnings, and it seems like an edge case anyway, I haven't added one for now.
@alexcrichton
Copy link
Member

@bors: rollup

kennytm added a commit to kennytm/rust that referenced this pull request Feb 28, 2018
…ster

Ensure main() always has external linkage

This ensures that the entry function is never elided due to inlining, even with `inline(always)`. Fixes rust-lang#47783.

There were a couple of possible ways of addressing this issue; I simply picked the one that seemed most direct. A warning could be appropriate, but considering using inlining hints in other places it doesn't apply also throws no warnings, and it seems like an edge case anyway, I haven't added one for now.
bors added a commit that referenced this pull request Feb 28, 2018
Rollup of 15 pull requests

- Successful merges: #48266, #48321, #48365, #48381, #48450, #48473, #48479, #48484, #48488, #48497, #48541, #48548, #48558, #48560, #48565
- Failed merges:
@bors bors merged commit 2466644 into rust-lang:master Feb 28, 2018
@varkor varkor deleted the inlined-main branch February 28, 2018 14:28
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants