Description
Hello everyone, this is my first Issue on the Rust project, let me know if I'm doing anthing wrong !
Problem
I am in the process of building a library/runtime for the Wii fully written in Rust. To acheive this goal, I need to cross-compile my library to a custom target I named powerpc-none-eabi
.
The json file contains "target-endian": "big"
and "data-layout": "E-m:e-p:32:32-i64:64-n32"
along other lines to define the architecture.
Normally, the build completes without an issue.
On the latest nighlty, the compiler fails and return:
PS S:\Code\ppc_ill> cargo build -Z build-std=core,alloc --target .\powerpc-none-eabi.json --release
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --target \\?\S:\Code\ppc_ill\powerpc-none-eabi.json --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: inconsistent target specification: "data-layout" claims architecture is big-endian, while "target-endian" is `little`
Of course, target-endian
is set to big
in the file, so this shouldn't happen.
Version it worked on
It most recently worked on:
rustc --version --verbose
:
rustc 1.49.0-nightly (1773f60ea 2020-11-08)
binary: rustc
commit-hash: 1773f60ea5d42e86b8fdf78d2fc5221ead222bc1
commit-date: 2020-11-08
host: x86_64-pc-windows-msvc
release: 1.49.0-nightly
Version with regression
It fails on this nightly, currently latest at the time of writing:
rustc --version --verbose
:
rustc 1.49.0-nightly (5404efc28 2020-11-11)
binary: rustc
commit-hash: 5404efc28a0cddee103ef6396c48ea71ff9631c8
commit-date: 2020-11-11
host: x86_64-pc-windows-msvc
release: 1.49.0-nightly
I can provide any file or other precision if necessary !
Thanks for reading my report !
Activity
nunolucas commentedon Nov 12, 2020
I was also having the some issue and tracked it to this: dc004d4#diff-aa810a3be0834da891b171a8b04b09d0d3bbb76ac27c757cd232235099e062d2R1309
That commit broke the equivalence between "target_endian" and "target-endian" by adding a case to the
key!()
macro without the replace line for it.jonas-schievink commentedon Nov 12, 2020
cc @petrochenkov
petrochenkov commentedon Nov 12, 2020
I'll fix this today.
petrochenkov commentedon Nov 12, 2020
Fixed in #78993.
parraman commentedon Nov 12, 2020
I hope this gets merged asap :-)
petrochenkov commentedon Nov 13, 2020
(Reopening because #78993 isn't merged yet.)
Rollup merge of rust-lang#78993 - petrochenkov:specdash, r=oli-obk