From bb346eaaa1e8d4733840d3f64de1f8076e682a5f Mon Sep 17 00:00:00 2001 From: Jeremiah Gowdy Date: Fri, 12 Aug 2022 15:41:26 -0700 Subject: [PATCH] build: enable pointer authentication for branch protection on arm64 PR-URL: https://github.com/nodejs/node/pull/43200 Reviewed-By: Richard Lau Reviewed-By: Darshan Sen --- configure.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.py b/configure.py index e53a83f332ffd6..e105d4e0cca4f6 100755 --- a/configure.py +++ b/configure.py @@ -1237,6 +1237,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