Skip to content

Commit

Permalink
Rollup merge of rust-lang#116264 - reez12g:issue-109728, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

add test for wasm linker override=clang

addressing rust-lang#109728
  • Loading branch information
matthiaskrgr authored Oct 8, 2023
2 parents 4dff9b4 + b9f92a8 commit bed4909
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 bed4909

Please sign in to comment.