aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-17 21:00:20 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-17 21:00:20 +0000
commit3df0cddd45075072a0d3660daa7772f9e9c4c419 (patch)
tree0b1aadb7636deb9ed627406e8d10f16665334718
parentca3328fb3c28ecf5a10a17abda2337ac1733c286 (diff)
parent9deb18e103632cfe5c094668ed0070a532c08e78 (diff)
downloadsoong-android-platform-12.1.0_r26.tar.gz
Change-Id: I69274be36ffefdbdc395d7901a67e778899c1803
-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",