Skip to content
Snippets Groups Projects
Commit 5f81570e authored by Martin Kröning's avatar Martin Kröning :crab:
Browse files

aach64 target: Align to aarch64-unknown-none-softfloat

parent 167c56bd
Branches
Tags
No related merge requests found
......@@ -7,10 +7,9 @@
"features": "+strict-align,-neon,-fp-armv8",
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"llvm-target": "aarch64-unknown-none-elf",
"llvm-target": "aarch64-unknown-none",
"max-atomic-width": 128,
"panic-strategy": "abort",
"position-independent-executables": true,
"static-position-independent-executables": true,
"relocation-model": "static",
"target-pointer-width": "64"
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ use std::{
path::{Path, PathBuf},
};
use anyhow::{anyhow, Result};
use anyhow::{anyhow, bail, Result};
use goblin::{archive::Archive, elf64::header};
use llvm_tools::LlvmTools;
use xshell::{cmd, Shell};
......@@ -71,15 +71,25 @@ impl flags::Build {
Err(VarError::NotPresent) => None,
Err(err) => return Err(err.into()),
};
let mut rustflags = outer_rustflags
.as_deref()
.map(|s| vec![s])
.unwrap_or_default();
rustflags.extend(RUSTFLAGS);
if self.instrument_mcount {
rustflags.push("-Zinstrument-mcount");
}
match self.arch.as_str() {
"x86_64" => {}
"aarch64" => {
rustflags.push("-Crelocation-model=pic");
}
arch => bail!("Unsupported arch: {arch}"),
}
Ok(rustflags.join("\x1f"))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment