fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
668 B22 linesraw
1# Test the behavior of #[link(.., kind = "raw-dylib")] and #[link_ordinal] on windows-msvc
2
3# only-windows
4
5include ../tools.mk
6
7all:
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)
11ifdef IS_MSVC
12	$(CC) "$(TMPDIR)"/exporter.obj exporter.def -link -dll -out:"$(TMPDIR)"/exporter.dll -noimplib
13else
14	$(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
15endif
16	"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
17
18ifdef RUSTC_BLESS_TEST
19	cp "$(TMPDIR)"/output.txt output.txt
20else
21	$(DIFF) output.txt "$(TMPDIR)"/output.txt
22endif