]> git.lizzy.rs Git - rust.git/blob - tests/run-make/raw-dylib-alt-calling-convention/Makefile
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / run-make / raw-dylib-alt-calling-convention / Makefile
1 # Test the behavior of #[link(.., kind = "raw-dylib")] with alternative calling conventions.
2
3 # only-x86
4 # only-windows
5
6 include ../../run-make-fulldeps/tools.mk
7
8 all:
9         $(RUSTC) --crate-type lib --crate-name raw_dylib_alt_calling_convention_test lib.rs
10         $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
11         $(call COMPILE_OBJ,"$(TMPDIR)"/extern.obj,extern.c)
12 ifdef IS_MSVC
13         $(CC) "$(TMPDIR)"/extern.obj -link -dll -out:"$(TMPDIR)"/extern.dll -noimplib
14 else
15         $(CC) "$(TMPDIR)"/extern.obj -shared -o "$(TMPDIR)"/extern.dll
16 endif
17
18         "$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
19 ifdef RUSTC_BLESS_TEST
20         cp "$(TMPDIR)"/output.txt output.txt
21 else
22         $(DIFF) output.txt "$(TMPDIR)"/output.txt
23 endif
24
25 ifdef IS_MSVC
26         "$(TMPDIR)"/driver true > "$(TMPDIR)"/output.msvc.txt
27 ifdef RUSTC_BLESS_TEST
28         cp "$(TMPDIR)"/output.msvc.txt output.msvc.txt
29 else
30         $(DIFF) output.msvc.txt "$(TMPDIR)"/output.msvc.txt
31 endif
32 endif