Skip to content

Commit 3b69c79

Browse files
committed
Rollup merge of rust-lang#45108 - phil-opp:patch-2, r=japaric
Fix data-layout field in x86_64-unknown-linux-gnu.json test file The current data-layout causes the following error: > rustc: /checkout/src/llvm/lib/CodeGen/MachineFunction.cpp:151: void llvm::MachineFunction::init(): Assertion `Target.isCompatibleDataLayout(getDataLayout()) && "Can't create a MachineFunction using a Module with a " "Target-incompatible DataLayout attached\n"' failed. The new value was generated according to [this comment by @japaric](rust-lang#31367 (comment)).
2 parents bedce1e + 06b9168 commit 3b69c79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/run-make/target-specs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ all:
55
$(RUSTC) foo.rs --target=my-invalid-platform.json 2>&1 | grep -q "Error loading target specification"
66
$(RUSTC) foo.rs --target=my-incomplete-platform.json 2>&1 | grep 'Field llvm-target'
77
RUST_TARGET_PATH=. $(RUSTC) foo.rs --target=my-awesome-platform --crate-type=lib --emit=asm
8-
RUST_TARGET_PATH=. $(RUSTC) foo.rs --target=x86_64-unknown-linux-gnu --crate-type=lib --emit=asm
8+
RUST_TARGET_PATH=. $(RUSTC) foo.rs --target=my-x86_64-unknown-linux-gnu-platform --crate-type=lib --emit=asm
99
$(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 -

src/test/run-make/target-specs/x86_64-unknown-linux-gnu.json renamed to src/test/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"pre-link-args": ["-m64"],
3-
"data-layout": "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128",
3+
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
44
"linker-flavor": "gcc",
55
"llvm-target": "x86_64-unknown-linux-gnu",
66
"target-endian": "little",

0 commit comments

Comments
 (0)