2021-09-10 19:34:09 -05:00
|
|
|
# Test the behavior of #[link(.., kind = "raw-dylib")] and #[link_ordinal] on windows-msvc
|
|
|
|
|
2021-11-01 17:49:58 -05:00
|
|
|
# only-windows
|
2021-09-10 19:34:09 -05:00
|
|
|
|
2023-03-30 07:58:50 -05:00
|
|
|
include ../tools.mk
|
2021-09-10 19:34:09 -05:00
|
|
|
|
|
|
|
all:
|
2022-07-01 15:01:41 -05:00
|
|
|
$(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs
|
|
|
|
$(RUSTC) --crate-type bin driver.rs -L "$(TMPDIR)"
|
2021-09-10 19:34:09 -05:00
|
|
|
$(call COMPILE_OBJ,"$(TMPDIR)"/exporter.obj,exporter.c)
|
2021-11-01 17:49:58 -05:00
|
|
|
ifdef IS_MSVC
|
2022-07-01 15:01:41 -05:00
|
|
|
$(CC) "$(TMPDIR)"/exporter.obj exporter.def -link -dll -out:"$(TMPDIR)"/exporter.dll -noimplib
|
2021-11-01 17:49:58 -05:00
|
|
|
else
|
|
|
|
$(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
|
|
|
|
endif
|
2021-09-10 19:34:09 -05:00
|
|
|
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
|
2023-10-07 01:23:10 -05:00
|
|
|
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt
|