Skip to content

Commit

Permalink
Rollup merge of rust-lang#76379 - petrochenkov:nodegen, r=Mark-Simula…
Browse files Browse the repository at this point in the history
…crum

rustbuild: Remove `Mode::Codegen`

It's no longer used.
  • Loading branch information
Dylan-DPC authored Sep 7, 2020
2 parents f037dca + 4fff14d commit 547806c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ impl<'a> Builder<'a> {
if cmd == "doc" || cmd == "rustdoc" {
let my_out = match mode {
// 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"),
_ => panic!("doc mode {:?} not expected", mode),
};
Expand Down Expand Up @@ -874,7 +874,7 @@ impl<'a> Builder<'a> {

match mode {
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
if target != compiler.host && cmd != "check" {
cargo.arg("-Zdual-proc-macros");
Expand Down Expand Up @@ -1059,7 +1059,7 @@ impl<'a> Builder<'a> {
}

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::ToolBootstrap | Mode::ToolStd | Mode::ToolRustc => {
self.config.rust_debuginfo_level_tools
Expand Down Expand Up @@ -1196,7 +1196,7 @@ impl<'a> Builder<'a> {
rustdocflags.arg("-Winvalid_codeblock_attributes");
}

if let Mode::Rustc | Mode::Codegen = mode {
if mode == Mode::Rustc {
rustflags.arg("-Zunstable-options");
rustflags.arg("-Wrustc::internal");
}
Expand Down Expand Up @@ -1359,7 +1359,7 @@ impl<'a> Builder<'a> {
// When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
// 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");
}

Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ pub enum Mode {
/// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory.
Rustc,

/// Build codegen libraries, placing output in the "stageN-codegen" directory
Codegen,

/// Build a tool, placing output in the "stage0-bootstrap-tools"
/// directory. This is for miscellaneous sets of tools that are built
/// using the bootstrap stage0 compiler in its entirety (target libraries
Expand Down Expand Up @@ -572,7 +569,6 @@ impl Build {
let suffix = match mode {
Mode::Std => "-std",
Mode::Rustc => "-rustc",
Mode::Codegen => "-codegen",
Mode::ToolBootstrap => "-bootstrap-tools",
Mode::ToolStd | Mode::ToolRustc => "-tools",
};
Expand Down

0 comments on commit 547806c

Please sign in to comment.