mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Auto merge of #58060 - andre-richter:master, r=nagisa
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.
This commit is contained in:
commit
4af96aeceb
@ -11,6 +11,7 @@ use super::{LldFlavor, LinkerFlavor, Target, TargetOptions, PanicStrategy};
|
||||
pub fn target() -> Result<Target, String> {
|
||||
let opts = TargetOptions {
|
||||
linker: Some("rust-lld".to_owned()),
|
||||
features: "+strict-align".to_string(),
|
||||
executables: true,
|
||||
relocation_model: "static".to_string(),
|
||||
disable_redzone: true,
|
||||
|
Loading…
Reference in New Issue
Block a user