diff options
| author | Alice Ryhl <aliceryhl@google.com> | 2024-05-14 21:09:42 +0200 |
|---|---|---|
| committer | Alice Ryhl <aliceryhl@google.com> | 2024-05-14 21:09:42 +0200 |
| commit | 518becf5ea30807f98b89002a70e5640e6e8bbf4 (patch) | |
| tree | ea1f17f3d2294f86c2a5fad70f681c806becbf10 /compiler/rustc_codegen_llvm | |
| parent | 40f0172c6aed0b2fb055c19108d226f8fb410f8c (diff) | |
| download | rust-518becf5ea30807f98b89002a70e5640e6e8bbf4.tar.gz rust-518becf5ea30807f98b89002a70e5640e6e8bbf4.zip | |
Fail on non-aarch64 targets
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index dbce7f43e62..b3359b81602 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -617,6 +617,11 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str // -Zfixed-x18 if sess.opts.unstable_opts.fixed_x18 { + if sess.target.arch != "aarch64" { + // TODO: What's the correct way to return a error here? + panic!("-Zfixed-x18 only allowed on aarch64"); + } + features.push("+reserve-x18".into()); } |
