aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/arch.go6
-rw-r--r--cc/config/arm64_device.go4
2 files changed, 7 insertions, 3 deletions
diff --git a/android/arch.go b/android/arch.go
index bb1b61366..6af047c07 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -1522,10 +1522,12 @@ func hasArmAbi(arch Arch) bool {
return PrefixInList(arch.Abi, "arm")
}
-// hasArmArch returns true if targets has at least non-native_bridge arm Android arch
+// hasArmAndroidArch returns true if targets has at least
+// one arm Android arch (possibly native bridged)
func hasArmAndroidArch(targets []Target) bool {
for _, target := range targets {
- if target.Os == Android && target.Arch.ArchType == Arm {
+ if target.Os == Android &&
+ (target.Arch.ArchType == Arm || target.Arch.ArchType == Arm64) {
return true
}
}
diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go
index 864fba100..dbc9c38ca 100644
--- a/cc/config/arm64_device.go
+++ b/cc/config/arm64_device.go
@@ -33,7 +33,9 @@ var (
},
"armv8-a-branchprot": []string{
"-march=armv8-a",
- "-mbranch-protection=standard",
+ // Disable BTI until drm vendors stop using OS libraries as sources
+ // of gadgets (https://issuetracker.google.com/216395195).
+ "-mbranch-protection=pac-ret",
},
"armv8-2a": []string{
"-march=armv8.2-a",