From 7a77108809da136b52c558ad32803896df3b1242 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 3 May 2024 15:57:31 -0700 Subject: [PATCH] rustc: Change LLVM target for the wasm32-wasip2 Rust target This commit changes the LLVM target of for the Rust `wasm32-wasip2` target to `wasm32-wasip2` as well. LLVM does a bit of detection on the target string to know when to call `wasm-component-ld` vs `wasm-ld` so otherwise clang is invoking the wrong linker. --- compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs index 5ff3f07daae..a4346cd5a87 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs @@ -55,7 +55,7 @@ pub fn target() -> Target { options.entry_name = "__main_void".into(); Target { - llvm_target: "wasm32-unknown-unknown".into(), + llvm_target: "wasm32-wasip2".into(), metadata: crate::spec::TargetMetadata { description: None, tier: None,