From 1afdd45881d39f6af434fba77ae07e68e1b62bce Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 9 Jul 2024 10:26:33 -0700 Subject: [PATCH] Update how wasm-component-ld is built Reuse preexisting macro and switch it to a "bootstrap tool" to try to resolve build issues. --- src/bootstrap/src/core/build_steps/tool.rs | 29 +--------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index e19a05371a7f2..d62166d8f0472 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -337,6 +337,7 @@ bootstrap_tool!( RustdocGUITest, "src/tools/rustdoc-gui-test", "rustdoc-gui-test", is_unstable_tool = true, allow_features = "test"; CoverageDump, "src/tools/coverage-dump", "coverage-dump"; RustcPerfWrapper, "src/tools/rustc-perf-wrapper", "rustc-perf-wrapper"; + WasmComponentLd, "src/tools/wasm-component-ld", "wasm-component-ld"; ); #[derive(Debug, Clone, Hash, PartialEq, Eq)] @@ -701,34 +702,6 @@ impl Step for LldWrapper { } } -#[derive(Debug, Clone, Hash, PartialEq, Eq)] -pub struct WasmComponentLd { - pub compiler: Compiler, - pub target: TargetSelection, -} - -impl Step for WasmComponentLd { - type Output = PathBuf; - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.never() - } - - fn run(self, builder: &Builder<'_>) -> PathBuf { - builder.ensure(ToolBuild { - compiler: self.compiler, - target: self.target, - tool: "wasm-component-ld", - mode: Mode::ToolStd, - path: "src/tools/wasm-component-ld", - source_type: SourceType::InTree, - extra_features: Vec::new(), - allow_features: "", - cargo_args: Vec::new(), - }) - } -} - #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct RustAnalyzer { pub compiler: Compiler,