History

arm64: rust: Enable Rust support for AArch64

This commit provides the build flags for Rust for AArch64. The core Rust support already in the kernel does the rest. This enables the PAC ret and BTI options in the Rust build flags to match the options that are used when building C. The Rust samples have been tested with this commit.

Jamie Cunliffe committed 3 years ago

Commit 724a75a1 parent f82811e5 files · +10 −1Browse files

Showing the changes to scripts (1 of 5 files). Show all

Unified · Split

scripts/generate_rust_target.rs+3−1
@@ -148,7 +148,9 @@ fn main() { · 147 unmodified lines
148148 let mut ts = TargetSpec::new();
149149
150150 // `llvm-target`s are taken from `scripts/Makefile.clang`.
151− if cfg.has("X86_64") {
151+ if cfg.has("ARM64") {
152+ panic!("arm64 uses the builtin rustc aarch64-unknown-none target");
153+ } else if cfg.has("X86_64") {
152154 ts.push("arch", "x86_64");
153155 ts.push(
154156 "data-layout",