]> git.lizzy.rs Git - rust.git/blob - tests/run-make/raw-dylib-link-ordinal/Makefile
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / 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         $(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
9         $(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
10         $(call COMPILE_OBJ,"$(TMPDIR)"/exporter.obj,exporter.c)
11 ifdef IS_MSVC
12         $(CC) "$(TMPDIR)"/exporter.obj exporter.def -link -dll -out:"$(TMPDIR)"/exporter.dll -noimplib
13 else
14         $(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
15 endif
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