From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/run-make/target-specs/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/run-make/target-specs/Makefile (limited to 'tests/run-make/target-specs/Makefile') diff --git a/tests/run-make/target-specs/Makefile b/tests/run-make/target-specs/Makefile new file mode 100644 index 000000000..a33f5368e --- /dev/null +++ b/tests/run-make/target-specs/Makefile @@ -0,0 +1,11 @@ +include ../tools.mk +all: + $(RUSTC) foo.rs --target=my-awesome-platform.json --crate-type=lib --emit=asm + $(CGREP) -v morestack < $(TMPDIR)/foo.s + $(RUSTC) foo.rs --target=my-invalid-platform.json 2>&1 | $(CGREP) "Error loading target specification" + $(RUSTC) foo.rs --target=my-incomplete-platform.json 2>&1 | $(CGREP) 'Field llvm-target' + RUST_TARGET_PATH=. $(RUSTC) foo.rs --target=my-awesome-platform --crate-type=lib --emit=asm + RUST_TARGET_PATH=. $(RUSTC) foo.rs --target=my-x86_64-unknown-linux-gnu-platform --crate-type=lib --emit=asm + $(RUSTC) -Z unstable-options --target=my-awesome-platform.json --print target-spec-json > $(TMPDIR)/test-platform.json && $(RUSTC) -Z unstable-options --target=$(TMPDIR)/test-platform.json --print target-spec-json | diff -q $(TMPDIR)/test-platform.json - + $(RUSTC) foo.rs --target=definitely-not-builtin-target 2>&1 | $(CGREP) 'may not set is_builtin' + $(RUSTC) foo.rs --target=mismatching-data-layout --crate-type=lib -- cgit v1.2.3