Auto merge of #116264 - reez12g:issue-109728, r=Mark-Simulacrum
add test for wasm linker override=clang addressing https://github.com/rust-lang/rust/issues/109728
This commit is contained in:
commit
8de6f99e32
13
tests/run-make/wasm-override-linker/Makefile
Normal file
13
tests/run-make/wasm-override-linker/Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
# needs-matching-clang
|
||||
|
||||
include ../tools.mk
|
||||
|
||||
ifeq ($(TARGET),wasm32-unknown-unknown)
|
||||
all:
|
||||
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
|
||||
else ifeq ($(TARGET),wasm64-unknown-unknown)
|
||||
all:
|
||||
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
|
||||
else
|
||||
all:
|
||||
endif
|
6
tests/run-make/wasm-override-linker/foo.rs
Normal file
6
tests/run-make/wasm-override-linker/foo.rs
Normal file
@ -0,0 +1,6 @@
|
||||
#![crate_type = "cdylib"]
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn add(a: i32, b: i32) -> i32 {
|
||||
a + b
|
||||
}
|
Loading…
Reference in New Issue
Block a user