Skip to content

Commit b9f92a8

Browse files
committed
add test for wasm linker override=clang
1 parent 085acd0 commit b9f92a8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Diff for: tests/run-make/wasm-override-linker/Makefile

+11
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

Diff for: tests/run-make/wasm-override-linker/foo.rs

+6
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)