[arm64] Build NDK with PAuth and BTI
This change adds a new arch named "armv8-a-branchprot". The new target
is no different from the usual "armv8-a" variant except it has the
compiler flag "-mbranch-protection=standard" set.
With this flag compiler emits Armv8.3-A Pointer Authentication and
Armv8.5-A Branch Target Identification instructions. All of these
instructions are in the hint space; therefore devices which do not
support any of these extensions would execute them as NOPs.
In terms of directory structure there is no change in the output of
build/soong/scripts/build-ndk-prebuilts.sh script.
Test: build NDK prebuilts
Change-Id: Ie52ccba5653fbf567f0b7ca312d8a8e71602ad06
diff --git a/rust/config/arm64_device.go b/rust/config/arm64_device.go
index 5066428..186e571 100644
--- a/rust/config/arm64_device.go
+++ b/rust/config/arm64_device.go
@@ -26,9 +26,10 @@
Arm64LinkFlags = []string{}
Arm64ArchVariantRustFlags = map[string][]string{
- "armv8-a": []string{},
- "armv8-2a": []string{},
- "armv8-2a-dotprod": []string{},
+ "armv8-a": []string{},
+ "armv8-a-branchprot": []string{},
+ "armv8-2a": []string{},
+ "armv8-2a-dotprod": []string{},
}
)