Rollup merge of #130479 - onur-ozkan:llvm-bitcode-linker-multiple-candidates, r=Kobzol

skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on

Similar to https://github.com/rust-lang/rust/issues/108767, resolves the `multiple candidates` problem for ci-rustc.

See https://github.com/rust-lang/rust/pull/122709#issuecomment-2355436227 for more context.

Blocker for #122709.
This commit is contained in:
Jubilee 2024-10-07 11:10:52 -07:00 committed by GitHub
commit 8cd9d954c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -872,8 +872,11 @@ fn make_run(run: RunConfig<'_>) {
fn run(self, builder: &Builder<'_>) -> PathBuf {
let bin_name = "llvm-bitcode-linker";
builder.ensure(compile::Std::new(self.compiler, self.compiler.host));
builder.ensure(compile::Rustc::new(self.compiler, self.target));
// If enabled, use ci-rustc and skip building the in-tree compiler.
if !builder.download_rustc() {
builder.ensure(compile::Std::new(self.compiler, self.compiler.host));
builder.ensure(compile::Rustc::new(self.compiler, self.target));
}
let cargo = prepare_tool_cargo(
builder,