Skip to content

Commit 4fff14d

Browse files
committed
rustbuild: Remove Mode::Codegen
1 parent 7d289ae commit 4fff14d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/bootstrap/builder.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ impl<'a> Builder<'a> {
796796
if cmd == "doc" || cmd == "rustdoc" {
797797
let my_out = match mode {
798798
// This is the intended out directory for compiler documentation.
799-
Mode::Rustc | Mode::ToolRustc | Mode::Codegen => self.compiler_doc_out(target),
799+
Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),
800800
Mode::Std => out_dir.join(target.triple).join("doc"),
801801
_ => panic!("doc mode {:?} not expected", mode),
802802
};
@@ -874,7 +874,7 @@ impl<'a> Builder<'a> {
874874

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

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

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

src/bootstrap/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,6 @@ pub enum Mode {
300300
/// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory.
301301
Rustc,
302302

303-
/// Build codegen libraries, placing output in the "stageN-codegen" directory
304-
Codegen,
305-
306303
/// Build a tool, placing output in the "stage0-bootstrap-tools"
307304
/// directory. This is for miscellaneous sets of tools that are built
308305
/// using the bootstrap stage0 compiler in its entirety (target libraries
@@ -572,7 +569,6 @@ impl Build {
572569
let suffix = match mode {
573570
Mode::Std => "-std",
574571
Mode::Rustc => "-rustc",
575-
Mode::Codegen => "-codegen",
576572
Mode::ToolBootstrap => "-bootstrap-tools",
577573
Mode::ToolStd | Mode::ToolRustc => "-tools",
578574
};

0 commit comments

Comments
 (0)