From d42c42cc8ac652ab387aa93205aed6ece8a5040a Mon Sep 17 00:00:00 2001 From: Jeremiah Gowdy Date: Tue, 24 May 2022 17:17:14 +0000 Subject: [PATCH] build: enable pointer authentication for branch protection on arm64 --- configure.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.py b/configure.py index 187c381660b369..0bd4c23c76c33e 100755 --- a/configure.py +++ b/configure.py @@ -1231,6 +1231,10 @@ def configure_node(o): o['variables']['want_separate_host_toolset'] = int(cross_compiling) + # Enable branch protection for arm64 + if target_arch == 'arm64': + o['cflags']+=['-msign-return-address=all'] + if options.node_snapshot_main is not None: if options.shared: # This should be possible to fix, but we will need to refactor the