You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 5, 2021. It is now read-only.
The data layout had become optional at some point. Some time after that,
it started causing a compiler error, so I removed it. From the Rust
side, those changes are documented in the following issue:
rust-lang/rust#31367
This is the pull request that made the data layout non-optional again,
is this one:
rust-lang/rust#32939
I took the layout I added here from the Rust compiler code. The various
built-in ARM targets seem to have mostly[1] the same target layout, which
makes sense, as the target layout describes mostly hardware
characteristics that shouldn't change between operation systems.
The layout I copied is from the `arm-unknown-linux-gnueabi` target,
here:
https://github.com/rust-lang/rust/blob/253b7c1e1a919a6b722c29a04241d6f08ff8c79a/src/librustc_back/target/arm_unknown_linux_gnueabi.rs#L19
I double-checked with the LLVM documentation on data layouts, and
everything seems legit, as far as I can tell. I don't completely
understand everything about it, though, so I can't give a 100%
guarantee. The LLVM documentation on data layouts is located here:
http://llvm.org/docs/LangRef.html#data-layout
In any case, the program compiles and works fine with the new layout, so
I'm assuming it's correct.
[1] "Mostly", because the one exception I see is the name mangline
option ("m:"), which I set to "e", meaning "ELF". This doesn't seem
terribly relevant. The only case, that I can think of, that might
make it relevant is if we had C code calling into our Rust code, but
then we would mark the called Rust functions as "#[no_mangle]"
anyway.
0 commit comments