From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- .../run-make/raw-dylib-cross-compilation/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/run-make/raw-dylib-cross-compilation/Makefile (limited to 'tests/run-make/raw-dylib-cross-compilation/Makefile') diff --git a/tests/run-make/raw-dylib-cross-compilation/Makefile b/tests/run-make/raw-dylib-cross-compilation/Makefile new file mode 100644 index 000000000..a8f97edd6 --- /dev/null +++ b/tests/run-make/raw-dylib-cross-compilation/Makefile @@ -0,0 +1,22 @@ +# Tests that raw-dylib cross compilation works correctly + +# only-gnu +# needs-i686-dlltool +# needs-x86_64-dlltool + +# i686 dlltool.exe can't product x64 binaries. +# ignore-i686-pc-windows-gnu + +include ../tools.mk + +all: + # Build as x86 and make sure that we have x86 objects only. + $(RUSTC) --crate-type lib --crate-name i686_raw_dylib_test --target i686-pc-windows-gnu lib.rs + "$(LLVM_BIN_DIR)"/llvm-objdump -a $(TMPDIR)/libi686_raw_dylib_test.rlib > $(TMPDIR)/i686.objdump.txt + $(CGREP) "file format coff-i386" < $(TMPDIR)/i686.objdump.txt + $(CGREP) -v "file format coff-x86-64" < $(TMPDIR)/i686.objdump.txt + # Build as x64 and make sure that we have x64 objects only. + $(RUSTC) --crate-type lib --crate-name x64_raw_dylib_test --target x86_64-pc-windows-gnu lib.rs + "$(LLVM_BIN_DIR)"/llvm-objdump -a $(TMPDIR)/libx64_raw_dylib_test.rlib > $(TMPDIR)/x64.objdump.txt + $(CGREP) "file format coff-x86-64" < $(TMPDIR)/x64.objdump.txt + $(CGREP) -v "file format coff-i386" < $(TMPDIR)/x64.objdump.txt -- cgit v1.2.3