-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add primary marker on codegen unit and generate main wrapper on primary codegen. #84507
Conversation
This comment has been minimized.
This comment has been minimized.
37490ab
to
c5406cd
Compare
This comment has been minimized.
This comment has been minimized.
c5406cd
to
7167212
Compare
This comment has been minimized.
This comment has been minimized.
4fc092b
to
977c2a7
Compare
This comment has been minimized.
This comment has been minimized.
44150ec
to
6b9e621
Compare
This comment has been minimized.
This comment has been minimized.
6b9e621
to
dea2655
Compare
This comment has been minimized.
This comment has been minimized.
dea2655
to
6c7abc8
Compare
This comment has been minimized.
This comment has been minimized.
6c7abc8
to
268479e
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #84310) made this pull request unmergeable. Please resolve the merge conflicts. |
9182f04
to
231b44c
Compare
This comment has been minimized.
This comment has been minimized.
231b44c
to
d84848b
Compare
Introducing a flag looks like a pretty okay approach, but I'm not a fan of how or where the flag is set in the first place. It seems to me that setting the |
d84848b
to
f6e3335
Compare
@nagisa Thanks for the review! I addressed the comments above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple nits. r=me once resolved.
f6e3335
to
f84b26d
Compare
This comment has been minimized.
This comment has been minimized.
… non-local cases.
f84b26d
to
89a6705
Compare
@nagisa Review comments addressed~ |
@bors r+ thanks! |
📌 Commit 89a6705 has been approved by |
…per, r=nagisa Add primary marker on codegen unit and generate main wrapper on primary codegen. This is the codegen part of changes extracted from rust-lang#84062. This add a marker called `primary` on each codegen units, where exactly one codegen unit will be `primary = true` at a time. This specific codegen unit will take charge of generating `main` wrapper when `main` is imported from a foreign crate after the implementation of RFC 1260. cc rust-lang#28937 I'm not sure who should i ask for review for codegen changes, so feel free to reassign. r? `@nagisa`
☀️ Test successful - checks-actions |
This has landed. @bjorn3 |
Thanks. I will update cg_clif tomorrow when the next nightly is released. |
This is the codegen part of changes extracted from #84062.
This add a marker called
primary
on each codegen units, where exactly one codegen unit will beprimary = true
at a time. This specific codegen unit will take charge of generatingmain
wrapper whenmain
is imported from a foreign crate after the implementation of RFC 1260.cc #28937
I'm not sure who should i ask for review for codegen changes, so feel free to reassign.
r? @nagisa