Skip to content

Commit b2ca513

Browse files
authored
Rollup merge of #76379 - petrochenkov:nodegen, r=Mark-Simulacrum
rustbuild: Remove `Mode::Codegen` It's no longer used.
2 parents 3cec71e + 4fff14d commit b2ca513

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/bootstrap/builder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ impl<'a> Builder<'a> {
797797
if cmd == "doc" || cmd == "rustdoc" {
798798
let my_out = match mode {
799799
// This is the intended out directory for compiler documentation.
800-
Mode::Rustc | Mode::ToolRustc | Mode::Codegen => self.compiler_doc_out(target),
800+
Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),
801801
Mode::Std => out_dir.join(target.triple).join("doc"),
802802
_ => panic!("doc mode {:?} not expected", mode),
803803
};
@@ -875,7 +875,7 @@ impl<'a> Builder<'a> {
875875

876876
match mode {
877877
Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {}
878-
Mode::Rustc | Mode::Codegen | Mode::ToolRustc => {
878+
Mode::Rustc | Mode::ToolRustc => {
879879
// Build proc macros both for the host and the target
880880
if target != compiler.host && cmd != "check" {
881881
cargo.arg("-Zdual-proc-macros");
@@ -1060,7 +1060,7 @@ impl<'a> Builder<'a> {
10601060
}
10611061

10621062
let debuginfo_level = match mode {
1063-
Mode::Rustc | Mode::Codegen => self.config.rust_debuginfo_level_rustc,
1063+
Mode::Rustc => self.config.rust_debuginfo_level_rustc,
10641064
Mode::Std => self.config.rust_debuginfo_level_std,
10651065
Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustc => {
10661066
self.config.rust_debuginfo_level_tools
@@ -1197,7 +1197,7 @@ impl<'a> Builder<'a> {
11971197
rustdocflags.arg("-Winvalid_codeblock_attributes");
11981198
}
11991199

1200-
if let Mode::Rustc | Mode::Codegen = mode {
1200+
if mode == Mode::Rustc {
12011201
rustflags.arg("-Zunstable-options");
12021202
rustflags.arg("-Wrustc::internal");
12031203
}
@@ -1360,7 +1360,7 @@ impl<'a> Builder<'a> {
13601360
// When we build Rust dylibs they're all intended for intermediate
13611361
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
13621362
// linking all deps statically into the dylib.
1363-
if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
1363+
if matches!(mode, Mode::Std | Mode::Rustc) {
13641364
rustflags.arg("-Cprefer-dynamic");
13651365
}
13661366

src/bootstrap/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,6 @@ pub enum Mode {
298298
/// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory.
299299
Rustc,
300300

301-
/// Build codegen libraries, placing output in the "stageN-codegen" directory
302-
Codegen,
303-
304301
/// Build a tool, placing output in the "stage0-bootstrap-tools"
305302
/// directory. This is for miscellaneous sets of tools that are built
306303
/// using the bootstrap stage0 compiler in its entirety (target libraries
@@ -570,7 +567,6 @@ impl Build {
570567
let suffix = match mode {
571568
Mode::Std => "-std",
572569
Mode::Rustc => "-rustc",
573-
Mode::Codegen => "-codegen",
574570
Mode::ToolBootstrap => "-bootstrap-tools",
575571
Mode::ToolStd | Mode::ToolRustc => "-tools",
576572
};

0 commit comments

Comments
 (0)