Skip to content

Commit f10da5f

Browse files
committed
build: llvm-tools: replace compiler.host
Use `target` instead.
1 parent 5fc87eb commit f10da5f

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

src/bootstrap/dist.rs

+7-15
Original file line numberDiff line numberDiff line change
@@ -1303,11 +1303,7 @@ impl Step for Extended {
13031303
let cargo_installer = builder.ensure(Cargo { stage, target });
13041304
let rustfmt_installer = builder.ensure(Rustfmt { stage, target });
13051305
let rls_installer = builder.ensure(Rls { stage, target });
1306-
let llvm_tools_installer = builder.ensure(LlvmTools {
1307-
stage,
1308-
target,
1309-
compiler: builder.compiler(stage, target)
1310-
});
1306+
let llvm_tools_installer = builder.ensure(LlvmTools { stage, target });
13111307
let mingw_installer = builder.ensure(Mingw { host: target });
13121308
let analysis_installer = builder.ensure(Analysis {
13131309
compiler: builder.compiler(stage, self.host),
@@ -1761,7 +1757,6 @@ impl Step for HashSign {
17611757
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
17621758
pub struct LlvmTools {
17631759
pub stage: u32,
1764-
pub compiler: Compiler,
17651760
pub target: Interned<String>,
17661761
}
17671762

@@ -1776,19 +1771,16 @@ impl Step for LlvmTools {
17761771
fn make_run(run: RunConfig) {
17771772
run.builder.ensure(LlvmTools {
17781773
stage: run.builder.top_stage,
1779-
compiler: run.builder.compiler(run.builder.top_stage, run.target),
17801774
target: run.target,
17811775
});
17821776
}
17831777

17841778
fn run(self, builder: &Builder) -> Option<PathBuf> {
1785-
let compiler = self.compiler;
1786-
let host = compiler.host;
1787-
17881779
let stage = self.stage;
1780+
let target = self.target;
17891781
assert!(builder.config.extended);
17901782

1791-
builder.info(&format!("Dist LlvmTools stage{} ({})", stage, host));
1783+
builder.info(&format!("Dist LlvmTools stage{} ({})", stage, target));
17921784
let src = builder.src.join("src/llvm");
17931785
let name = pkgname(builder, "llvm-tools");
17941786

@@ -1800,9 +1792,9 @@ impl Step for LlvmTools {
18001792
// Prepare the image directory
18011793
for tool in LLVM_TOOLS {
18021794
let exe = builder
1803-
.llvm_out(host)
1795+
.llvm_out(target)
18041796
.join("bin")
1805-
.join(exe(tool, &compiler.host));
1797+
.join(exe(tool, &target));
18061798
builder.install(&exe, &image.join("bin"), 0o755);
18071799
}
18081800

@@ -1824,12 +1816,12 @@ impl Step for LlvmTools {
18241816
.arg("--work-dir").arg(&tmpdir(builder))
18251817
.arg("--output-dir").arg(&distdir(builder))
18261818
.arg("--non-installed-overlay").arg(&overlay)
1827-
.arg(format!("--package-name={}-{}", name, host))
1819+
.arg(format!("--package-name={}-{}", name, target))
18281820
.arg("--legacy-manifest-dirs=rustlib,cargo")
18291821
.arg("--component-name=llvm-tools");
18301822

18311823

18321824
builder.run(&mut cmd);
1833-
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, host)))
1825+
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
18341826
}
18351827
}

0 commit comments

Comments
 (0)