Add test for #50176

This commit is contained in:
Mateusz Mikuła 2020-07-03 21:00:14 +02:00
parent db9a84a1af
commit 87abd656da
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,9 @@
include ../tools.mk
# only-windows-gnu
all:
$(RUSTC) foo.rs
# FIXME: we should make sure __stdcall calling convention is used here
# but that only works with LLD right now
nm -g "$(call IMPLIB,foo)" | $(CGREP) bar

View File

@ -0,0 +1,4 @@
#![crate_type = "cdylib"]
#[no_mangle]
pub extern "system" fn bar() {}

View File

@ -48,6 +48,7 @@ ifdef IS_MSVC
STATICLIB = $(TMPDIR)/$(1).lib
STATICLIB_GLOB = $(1)*.lib
else
IMPLIB = $(TMPDIR)/lib$(1).dll.a
STATICLIB = $(TMPDIR)/lib$(1).a
STATICLIB_GLOB = lib$(1)*.a
endif