build: enable pointer authentication for branch protection on arm64

PR-URL: https://github.com/nodejs/node/pull/43200
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Jeremiah Gowdy 2022-08-12 15:41:26 -07:00 committed by GitHub
parent 159b4d7a94
commit 938212f3e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1208,6 +1208,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