From c370bf44d84a2e83617712de81ac602f59acc63a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 15 Jul 2024 12:11:49 -0700 Subject: [PATCH] Don't use stage0 compiler for wasm-component-ld Switch it to using a just-built standard library which enables it to be cross compiled. Additionally allow it access to `min_specialization` which `ahash`, a dependency, wants. --- src/bootstrap/src/core/build_steps/compile.rs | 2 +- src/bootstrap/src/core/build_steps/tool.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 5650fea1b8124..175ef52b33fce 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1837,7 +1837,7 @@ impl Step for Assemble { // `wasm32-wasip2` target of Rust. let wasm_component_ld_exe = builder.ensure(crate::core::build_steps::tool::WasmComponentLd { - compiler: build_compiler.with_stage(0), + compiler: build_compiler, target: target_compiler.host, }); builder.copy_link( diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index d62166d8f0472..7bc410b9e8878 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -337,7 +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"; + WasmComponentLd, "src/tools/wasm-component-ld", "wasm-component-ld", is_unstable_tool = true, allow_features = "min_specialization"; ); #[derive(Debug, Clone, Hash, PartialEq, Eq)]