Skip to content

Commit

Permalink
Auto merge of rust-lang#116264 - reez12g:issue-109728, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
add test for wasm linker override=clang

addressing rust-lang#109728
  • Loading branch information
bors committed Oct 9, 2023
2 parents bf9a1c8 + b9f92a8 commit 23098d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/run-make/wasm-override-linker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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 changes: 6 additions & 0 deletions tests/run-make/wasm-override-linker/foo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#![crate_type = "cdylib"]

#[no_mangle]
pub extern "C" fn add(a: i32, b: i32) -> i32 {
a + b
}

0 comments on commit 23098d0

Please sign in to comment.