Update arm_control_flow_integrity to use bti+pac-ret
Following a similar change in chromium/src, mbranch-protection=standard
will now also enable Guarded Control Stack.
This has been changed to bti+pac until the time comes to enable gcs for
testing.
Change-Id: I45158353859da45feae121e8594b79a5fbbbe64a
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/76068
Tested-by: Shahbaz Youssefi <syoussefi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index b405f51..cec2b68 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -53,6 +53,9 @@
if (arm_control_flow_integrity == "standard") {
cflags += [ "-mbranch-protection=standard" ]
asmflags += [ "-mbranch-protection=standard" ]
+ } else if (arm_control_flow_integrity == "bti+pac") {
+ cflags += [ "-mbranch-protection=bti+pac-ret" ]
+ asmflags += [ "-mbranch-protection=bti+pac-ret" ]
} else if (arm_control_flow_integrity == "pac") {
cflags += [ "-mbranch-protection=pac-ret" ]
asmflags += [ "-mbranch-protection=pac-ret" ]