summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJamie Cunliffe <Jamie.Cunliffe@arm.com>2023-10-20 17:50:56 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2024-02-09 17:12:36 +0100
commit724a75ac9542fe1f8aaa587da4d3863d8ea292fc (patch)
tree11847accd037de841ea5c58b62efcf7290ebae36 /scripts
parentrust: Refactor the build target to allow the use of builtin targets (diff)
downloadlinux-724a75ac9542fe1f8aaa587da4d3863d8ea292fc.tar.xz
linux-724a75ac9542fe1f8aaa587da4d3863d8ea292fc.zip
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. Signed-off-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com> Acked-by: Will Deacon <will@kernel.org> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> Tested-by: Boqun Feng <boqun.feng@gmail.com> Acked-by: Miguel Ojeda <ojeda@kernel.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Fabien Parent <fabien.parent@linaro.org> Link: https://lore.kernel.org/r/20231020155056.3495121-3-Jamie.Cunliffe@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generate_rust_target.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/generate_rust_target.rs b/scripts/generate_rust_target.rs
index 0da52b548ba5..9e117957ea7b 100644
--- a/scripts/generate_rust_target.rs
+++ b/scripts/generate_rust_target.rs
@@ -148,7 +148,9 @@ fn main() {
let mut ts = TargetSpec::new();
// `llvm-target`s are taken from `scripts/Makefile.clang`.
- if cfg.has("X86_64") {
+ if cfg.has("ARM64") {
+ panic!("arm64 uses the builtin rustc aarch64-unknown-none target");
+ } else if cfg.has("X86_64") {
ts.push("arch", "x86_64");
ts.push(
"data-layout",