authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-23 13:08:39+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-09-23 13:08:56+02:00
log55fe0ad7da5b1b3b946d81a66ade1f0e1797706c
tree36c05f9f70da1fcd10ab018838666c4fc0147fde
parent0d20454691fd0492daaae9984f440129dfe6307b
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

llvm: enable bti and pac-ret for aarch64-linux-android


1 files changed, 2 insertions(+), 2 deletions(-)

src/codegen/llvm.zig+2-2
......@@ -493,7 +493,7 @@ pub const Object = struct {
493493 }
494494
495495 // The frontend should eventually offer options to control these.
496 if (target.cpu.arch.isAarch64() and target.os.tag == .openbsd) {
496 if (target.cpu.arch.isAarch64() and (target.os.tag == .openbsd or target.abi.isAndroid())) {
497497 module_flags.appendAssumeCapacity(try o.builder.metadataTuple(&.{
498498 behavior_min,
499499 (try o.builder.metadataString("branch-target-enforcement")).toMetadata(),
......@@ -2253,7 +2253,7 @@ pub const Object = struct {
22532253 }
22542254
22552255 // The frontend should eventually offer options to control these.
2256 if (target.cpu.arch.isAarch64() and target.os.tag == .openbsd) {
2256 if (target.cpu.arch.isAarch64() and (target.os.tag == .openbsd or target.abi.isAndroid())) {
22572257 try attributes.addFnAttr(.{ .string = .{
22582258 .kind = try o.builder.string("branch-target-enforcement"),
22592259 .value = try o.builder.string(""),