Skip to content

Commit d42c42c

Browse files
committed
build: enable pointer authentication for branch protection on arm64
1 parent 4a3ba87 commit d42c42c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

configure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,10 @@ def configure_node(o):
12311231

12321232
o['variables']['want_separate_host_toolset'] = int(cross_compiling)
12331233

1234+
# Enable branch protection for arm64
1235+
if target_arch == 'arm64':
1236+
o['cflags']+=['-msign-return-address=all']
1237+
12341238
if options.node_snapshot_main is not None:
12351239
if options.shared:
12361240
# This should be possible to fix, but we will need to refactor the

0 commit comments

Comments
 (0)