]> git.lizzy.rs Git - rust.git/commit
targets: aarch64-unknown-none: Add +strict-align
authorAndre Richter <andre.o.richter@gmail.com>
Fri, 1 Feb 2019 21:11:40 +0000 (22:11 +0100)
committerAndre Richter <andre.o.richter@gmail.com>
Fri, 1 Feb 2019 21:11:40 +0000 (22:11 +0100)
commitc4e46140f6a295d2d668ccc5bf25858233b11cbb
tree2aa33e64d46940e104b823e7927bfe8ea4218fef
parent23d8d0c319c37287657280bde61816d297f966d8
targets: aarch64-unknown-none: Add +strict-align

On AArch64, an unaligned access causes a synchronous exception. In the current
state of the target, the compiler might generate unaligned accesses, see
https://github.com/rust-embedded/rust-raspi3-tutorial/issues/10.

Since this is a bare-metal target, it is possible that there is no exception
handling in place (yet) to recover from this case, causing a binary to just
silently fail.

Add `+strict-align` to avoid this case.
src/librustc_target/spec/aarch64_unknown_none.rs