forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#84507 - crlf0710:codegen_nonlocal_main_wrappe…
…r, 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`
- Loading branch information
Showing
5 changed files
with
20 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
// build-fail | ||
// run-pass | ||
// aux-build:main_functions.rs | ||
|
||
#![feature(imported_main)] | ||
|
||
extern crate main_functions; | ||
pub use main_functions::boilerplate as main; //~ ERROR entry symbol `main` from foreign crate | ||
|
||
// FIXME: Should be run-pass | ||
pub use main_functions::boilerplate as main; |
10 changes: 0 additions & 10 deletions
10
src/test/ui/entry-point/imported_main_from_extern_crate.stderr
This file was deleted.
Oops, something went wrong.