Skip to content

Commit 7a77108

Browse files
committed
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.
1 parent befabbc commit 7a77108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn target() -> Target {
5555
options.entry_name = "__main_void".into();
5656

5757
Target {
58-
llvm_target: "wasm32-unknown-unknown".into(),
58+
llvm_target: "wasm32-wasip2".into(),
5959
metadata: crate::spec::TargetMetadata {
6060
description: None,
6161
tier: None,

0 commit comments

Comments
 (0)