Rollup merge of #76379 - petrochenkov:nodegen, r=Mark-Simulacrum

rustbuild: Remove `Mode::Codegen`

It's no longer used.
This commit is contained in:
Dylan DPC 2020-09-09 01:35:15 +02:00 committed by GitHub
commit b2ca5131ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View File

@ -797,7 +797,7 @@ pub fn cargo(
if cmd == "doc" || cmd == "rustdoc" { if cmd == "doc" || cmd == "rustdoc" {
let my_out = match mode { let my_out = match mode {
// This is the intended out directory for compiler documentation. // This is the intended out directory for compiler documentation.
Mode::Rustc | Mode::ToolRustc | Mode::Codegen => self.compiler_doc_out(target), Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),
Mode::Std => out_dir.join(target.triple).join("doc"), Mode::Std => out_dir.join(target.triple).join("doc"),
_ => panic!("doc mode {:?} not expected", mode), _ => panic!("doc mode {:?} not expected", mode),
}; };
@ -875,7 +875,7 @@ pub fn cargo(
match mode { match mode {
Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {} Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {}
Mode::Rustc | Mode::Codegen | Mode::ToolRustc => { Mode::Rustc | Mode::ToolRustc => {
// Build proc macros both for the host and the target // Build proc macros both for the host and the target
if target != compiler.host && cmd != "check" { if target != compiler.host && cmd != "check" {
cargo.arg("-Zdual-proc-macros"); cargo.arg("-Zdual-proc-macros");
@ -1060,7 +1060,7 @@ pub fn cargo(
} }
let debuginfo_level = match mode { let debuginfo_level = match mode {
Mode::Rustc | Mode::Codegen => self.config.rust_debuginfo_level_rustc, Mode::Rustc => self.config.rust_debuginfo_level_rustc,
Mode::Std => self.config.rust_debuginfo_level_std, Mode::Std => self.config.rust_debuginfo_level_std,
Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustc => { Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustc => {
self.config.rust_debuginfo_level_tools self.config.rust_debuginfo_level_tools
@ -1197,7 +1197,7 @@ pub fn cargo(
rustdocflags.arg("-Winvalid_codeblock_attributes"); rustdocflags.arg("-Winvalid_codeblock_attributes");
} }
if let Mode::Rustc | Mode::Codegen = mode { if mode == Mode::Rustc {
rustflags.arg("-Zunstable-options"); rustflags.arg("-Zunstable-options");
rustflags.arg("-Wrustc::internal"); rustflags.arg("-Wrustc::internal");
} }
@ -1360,7 +1360,7 @@ pub fn cargo(
// When we build Rust dylibs they're all intended for intermediate // When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of // usage, so make sure we pass the -Cprefer-dynamic flag instead of
// linking all deps statically into the dylib. // linking all deps statically into the dylib.
if let Mode::Std | Mode::Rustc | Mode::Codegen = mode { if matches!(mode, Mode::Std | Mode::Rustc) {
rustflags.arg("-Cprefer-dynamic"); rustflags.arg("-Cprefer-dynamic");
} }

View File

@ -298,9 +298,6 @@ pub enum Mode {
/// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory. /// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory.
Rustc, Rustc,
/// Build codegen libraries, placing output in the "stageN-codegen" directory
Codegen,
/// Build a tool, placing output in the "stage0-bootstrap-tools" /// Build a tool, placing output in the "stage0-bootstrap-tools"
/// directory. This is for miscellaneous sets of tools that are built /// directory. This is for miscellaneous sets of tools that are built
/// using the bootstrap stage0 compiler in its entirety (target libraries /// using the bootstrap stage0 compiler in its entirety (target libraries
@ -570,7 +567,6 @@ fn stage_out(&self, compiler: Compiler, mode: Mode) -> PathBuf {
let suffix = match mode { let suffix = match mode {
Mode::Std => "-std", Mode::Std => "-std",
Mode::Rustc => "-rustc", Mode::Rustc => "-rustc",
Mode::Codegen => "-codegen",
Mode::ToolBootstrap => "-bootstrap-tools", Mode::ToolBootstrap => "-bootstrap-tools",
Mode::ToolStd | Mode::ToolRustc => "-tools", Mode::ToolStd | Mode::ToolRustc => "-tools",
}; };