]> git.lizzy.rs Git - rust.git/blob - tests/run-make/raw-dylib-stdcall-ordinal/Makefile
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / run-make / raw-dylib-stdcall-ordinal / Makefile
1 # Test the behavior of #[link(.., kind = "raw-dylib")], #[link_ordinal], and alternative calling conventions on i686 windows.
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_test lib.rs
10         $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
11         $(call COMPILE_OBJ,"$(TMPDIR)"/exporter.obj,exporter.c)
12 ifdef IS_MSVC
13         $(CC) "$(TMPDIR)"/exporter.obj exporter-msvc.def -link -dll -out:"$(TMPDIR)"/exporter.dll -noimplib
14 else
15         $(CC) "$(TMPDIR)"/exporter.obj exporter-gnu.def -shared -o "$(TMPDIR)"/exporter.dll
16 endif
17         "$(TMPDIR)"/driver > "$(TMPDIR)"/actual_output.txt
18
19 ifdef RUSTC_BLESS_TEST
20         cp "$(TMPDIR)"/actual_output.txt expected_output.txt
21 else
22         $(DIFF) expected_output.txt "$(TMPDIR)"/actual_output.txt
23 endif