Skip to content

Commit 518becf

Browse files
committed
Fail on non-aarch64 targets
1 parent 40f0172 commit 518becf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,11 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str
617617

618618
// -Zfixed-x18
619619
if sess.opts.unstable_opts.fixed_x18 {
620+
if sess.target.arch != "aarch64" {
621+
// TODO: What's the correct way to return a error here?
622+
panic!("-Zfixed-x18 only allowed on aarch64");
623+
}
624+
620625
features.push("+reserve-x18".into());
621626
}
622627

0 commit comments

Comments
 (0)