]> git.lizzy.rs Git - rust.git/blob - src/test/run-make/raw-dylib-link-ordinal/Makefile
Rollup merge of #95346 - Aaron1011:stablize-const-extern-fn, r=pnkfelix
[rust.git] / src / test / run-make / raw-dylib-link-ordinal / Makefile
1 # Test the behavior of #[link(.., kind = "raw-dylib")] and #[link_ordinal] on windows-msvc
2
3 # only-windows
4
5 -include ../../run-make-fulldeps/tools.mk
6
7 all:
8         $(call COMPILE_OBJ,"$(TMPDIR)"/exporter.obj,exporter.c)
9 ifdef IS_MSVC
10         $(CC) "$(TMPDIR)"/exporter.obj exporter.def -link -dll -out:"$(TMPDIR)"/exporter.dll
11 else
12         $(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
13 endif
14         $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
15         $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
16         "$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
17
18 ifdef RUSTC_BLESS_TEST
19         cp "$(TMPDIR)"/output.txt output.txt
20 else
21         $(DIFF) output.txt "$(TMPDIR)"/output.txt
22 endif