Skip to content

Commit d0c235e

Browse files
committedOct 9, 2023
Auto merge of rust-lang#116264 - reez12g:issue-109728, r=Mark-Simulacrum
add test for wasm linker override=clang addressing rust-lang#109728
2 parents 37fda98 + b9f92a8 commit d0c235e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include ../tools.mk
2+
3+
ifeq ($(TARGET),wasm32-unknown-unknown)
4+
all:
5+
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
6+
else ifeq ($(TARGET),wasm64-unknown-unknown)
7+
all:
8+
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
9+
else
10+
all:
11+
endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![crate_type = "cdylib"]
2+
3+
#[no_mangle]
4+
pub extern "C" fn add(a: i32, b: i32) -> i32 {
5+
a + b
6+
}

0 commit comments

Comments
 (0)