-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Move code in rustc_driver
out to a new rustc_driver_impl
crate to allow pipelining
#107549
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
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "rustc_driver" | ||
version = "0.0.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["dylib"] | ||
|
||
[dependencies] | ||
rustc_driver_impl = { path = "../rustc_driver_impl" } |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// This crate is intentionally empty and a rexport of `rustc_driver_impl` to allow the code in | ||
// `rustc_driver_impl` to be compiled in parallel with other crates. | ||
|
||
#![allow(unused_extern_crates)] | ||
extern crate rustc_driver_impl; | ||
|
||
pub use rustc_driver_impl::*; |
This file contains hidden or 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 hidden or 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,67 +1,67 @@ | ||
use rustc_macros::Diagnostic; | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_rlink_unable_to_read)] | ||
#[diag(driver_impl_rlink_unable_to_read)] | ||
pub(crate) struct RlinkUnableToRead { | ||
pub err: std::io::Error, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_rlink_wrong_file_type)] | ||
#[diag(driver_impl_rlink_wrong_file_type)] | ||
pub(crate) struct RLinkWrongFileType; | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_rlink_empty_version_number)] | ||
#[diag(driver_impl_rlink_empty_version_number)] | ||
pub(crate) struct RLinkEmptyVersionNumber; | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_rlink_encoding_version_mismatch)] | ||
#[diag(driver_impl_rlink_encoding_version_mismatch)] | ||
pub(crate) struct RLinkEncodingVersionMismatch { | ||
pub version_array: String, | ||
pub rlink_version: u32, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_rlink_rustc_version_mismatch)] | ||
#[diag(driver_impl_rlink_rustc_version_mismatch)] | ||
pub(crate) struct RLinkRustcVersionMismatch<'a> { | ||
pub rustc_version: String, | ||
pub current_version: &'a str, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_rlink_no_a_file)] | ||
#[diag(driver_impl_rlink_no_a_file)] | ||
pub(crate) struct RlinkNotAFile; | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_unpretty_dump_fail)] | ||
#[diag(driver_impl_unpretty_dump_fail)] | ||
pub(crate) struct UnprettyDumpFail { | ||
pub path: String, | ||
pub err: String, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_ice)] | ||
#[diag(driver_impl_ice)] | ||
pub(crate) struct Ice; | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_ice_bug_report)] | ||
#[diag(driver_impl_ice_bug_report)] | ||
pub(crate) struct IceBugReport<'a> { | ||
pub bug_report_url: &'a str, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_ice_version)] | ||
#[diag(driver_impl_ice_version)] | ||
pub(crate) struct IceVersion<'a> { | ||
pub version: &'a str, | ||
pub triple: &'a str, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_ice_flags)] | ||
#[diag(driver_impl_ice_flags)] | ||
pub(crate) struct IceFlags { | ||
pub flags: String, | ||
} | ||
|
||
#[derive(Diagnostic)] | ||
#[diag(driver_ice_exclude_cargo_defaults)] | ||
#[diag(driver_impl_ice_exclude_cargo_defaults)] | ||
pub(crate) struct IceExcludeCargoDefaults; |
This file contains hidden or 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,19 +1,19 @@ | ||
driver_rlink_unable_to_read = failed to read rlink file: `{$err}` | ||
driver_impl_rlink_unable_to_read = failed to read rlink file: `{$err}` | ||
|
||
driver_rlink_wrong_file_type = The input does not look like a .rlink file | ||
driver_impl_rlink_wrong_file_type = The input does not look like a .rlink file | ||
|
||
driver_rlink_empty_version_number = The input does not contain version number | ||
driver_impl_rlink_empty_version_number = The input does not contain version number | ||
|
||
driver_rlink_encoding_version_mismatch = .rlink file was produced with encoding version `{$version_array}`, but the current version is `{$rlink_version}` | ||
driver_impl_rlink_encoding_version_mismatch = .rlink file was produced with encoding version `{$version_array}`, but the current version is `{$rlink_version}` | ||
|
||
driver_rlink_rustc_version_mismatch = .rlink file was produced by rustc version `{$rustc_version}`, but the current version is `{$current_version}` | ||
driver_impl_rlink_rustc_version_mismatch = .rlink file was produced by rustc version `{$rustc_version}`, but the current version is `{$current_version}` | ||
|
||
driver_rlink_no_a_file = rlink must be a file | ||
driver_impl_rlink_no_a_file = rlink must be a file | ||
|
||
driver_unpretty_dump_fail = pretty-print failed to write `{$path}` due to error `{$err}` | ||
driver_impl_unpretty_dump_fail = pretty-print failed to write `{$path}` due to error `{$err}` | ||
|
||
driver_ice = the compiler unexpectedly panicked. this is a bug. | ||
driver_ice_bug_report = we would appreciate a bug report: {$bug_report_url} | ||
driver_ice_version = rustc {$version} running on {$triple} | ||
driver_ice_flags = compiler flags: {$flags} | ||
driver_ice_exclude_cargo_defaults = some of the compiler flags provided by cargo are hidden | ||
driver_impl_ice = the compiler unexpectedly panicked. this is a bug. | ||
driver_impl_ice_bug_report = we would appreciate a bug report: {$bug_report_url} | ||
driver_impl_ice_version = rustc {$version} running on {$triple} | ||
driver_impl_ice_flags = compiler flags: {$flags} | ||
driver_impl_ice_exclude_cargo_defaults = some of the compiler flags provided by cargo are hidden |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.