Skip to content

Commit 8de6f99

Browse files
committed
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 0233608 + 4fa4758 commit 8de6f99

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)