summaryrefslogtreecommitdiffstats
path: root/tests/run-make/target-specs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
commita0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch)
treefc451898ccaf445814e26b46664d78702178101d /tests/run-make/target-specs
parentAdding debian version 1.71.1+dfsg1-2. (diff)
downloadrustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz
rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/target-specs')
-rw-r--r--tests/run-make/target-specs/Makefile1
-rw-r--r--tests/run-make/target-specs/endianness-mismatch.json11
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/run-make/target-specs/Makefile b/tests/run-make/target-specs/Makefile
index a33f5368e..62d5365a7 100644
--- a/tests/run-make/target-specs/Makefile
+++ b/tests/run-make/target-specs/Makefile
@@ -8,4 +8,5 @@ all:
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=endianness-mismatch 2>&1 | $(CGREP) '"data-layout" claims architecture is little-endian'
$(RUSTC) foo.rs --target=mismatching-data-layout --crate-type=lib
diff --git a/tests/run-make/target-specs/endianness-mismatch.json b/tests/run-make/target-specs/endianness-mismatch.json
new file mode 100644
index 000000000..431053ea9
--- /dev/null
+++ b/tests/run-make/target-specs/endianness-mismatch.json
@@ -0,0 +1,11 @@
+{
+ "pre-link-args": {"gcc": ["-m64"]},
+ "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
+ "linker-flavor": "gcc",
+ "llvm-target": "x86_64-unknown-linux-gnu",
+ "target-endian": "big",
+ "target-pointer-width": "64",
+ "target-c-int-width": "32",
+ "arch": "x86_64",
+ "os": "linux"
+}