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 14, 2023
2 parents 0233608 + 4fa4758 commit 8de6f99
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/run-make/wasm-override-linker/Makefile
Original file line number Diff line number Diff line change
@@ -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 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 8de6f99

Please sign in to comment.