Skip to content

Commit d9aae63

Browse files
committed
Auto merge of #38076 - alexcrichton:another-rustbuild-bug, r=japaric
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 #38039
2 parents 7b06438 + 8e9f7f5 commit d9aae63

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
@@ -198,6 +198,14 @@ pub fn build_rules(build: &Build) -> Rules {
198198
});
199199
}
200200
for (krate, path, default) in krates("rustc-main") {
201+
// We hijacked the `src/rustc` path above for "build just the compiler"
202+
// so let's not reinterpret it here as everything and redirect the
203+
// `src/rustc` path to a nonexistent path.
204+
let path = if path == "src/rustc" {
205+
"path/to/nowhere"
206+
} else {
207+
path
208+
};
201209
rules.build(&krate.build_step, path)
202210
.dep(|s| s.name("libtest"))
203211
.dep(move |s| s.name("llvm").host(&build.config.build).stage(0))

0 commit comments

Comments
 (0)