Add codegen option for branch protection and pointer authentication on AArch64
The branch-protection codegen option enables the use of hint-space pointer authentication code for AArch64 targets
This commit is contained in:
committed by
Jamie Cunliffe
parent
2446a21595
commit
837cc1687f
@@ -45,8 +45,13 @@ fn declare_raw_fn(
|
||||
llvm::Attribute::NoRedZone.apply_llfn(Function, llfn);
|
||||
}
|
||||
|
||||
if cx.tcx.sess.target.arch == "aarch64" {
|
||||
attributes::set_branch_protection(cx.tcx.sess, llfn);
|
||||
}
|
||||
|
||||
attributes::default_optimisation_attrs(cx.tcx.sess, llfn);
|
||||
attributes::non_lazy_bind(cx.sess(), llfn);
|
||||
|
||||
llfn
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user