]> git.lizzy.rs Git - rust.git/blob - src/test/run-make/raw-dylib-stdcall-ordinal/Makefile
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / 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         $(call COMPILE_OBJ,"$(TMPDIR)"/exporter.obj,exporter.c)
10 ifdef IS_MSVC
11         $(CC) "$(TMPDIR)"/exporter.obj exporter-msvc.def -link -dll -out:"$(TMPDIR)"/exporter.dll
12 else
13         $(CC) "$(TMPDIR)"/exporter.obj exporter-gnu.def -shared -o "$(TMPDIR)"/exporter.dll
14 endif
15         $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
16         $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
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