Skip to content

Commit 4fa4758

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

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

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

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# needs-matching-clang
2+
3+
include ../tools.mk
4+
5+
ifeq ($(TARGET),wasm32-unknown-unknown)
6+
all:
7+
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
8+
else ifeq ($(TARGET),wasm64-unknown-unknown)
9+
all:
10+
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
11+
else
12+
all:
13+
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)