Skip to content

Commit 8e9f7f5

Browse files
committed
rustbuild: Use src/rustc for assembled compilers
The `src/rustc` path is intended for assembling a compiler (e.g. the bare bones) not actually compiling the whole compiler itself. This path was accidentally getting hijacked to represent the whole compiler being compiled, so let's redirect that elsewhere for that particular cargo project. Closes rust-lang#38039
1 parent 5de15be commit 8e9f7f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bootstrap/step.rs

+8
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ pub fn build_rules(build: &Build) -> Rules {
148148
});
149149
}
150150
for (krate, path, default) in krates("rustc-main") {
151+
// We hijacked the `src/rustc` path above for "build just the compiler"
152+
// so let's not reinterpret it here as everything and redirect the
153+
// `src/rustc` path to a nonexistent path.
154+
let path = if path == "src/rustc" {
155+
"path/to/nowhere"
156+
} else {
157+
path
158+
};
151159
rules.build(&krate.build_step, path)
152160
.dep(|s| s.name("libtest"))
153161
.dep(move |s| s.name("llvm").host(&build.config.build).stage(0))

0 commit comments

Comments
 (0)