diff --git a/configure.py b/configure.py index 00c8513d6820ec..ec4f31f69a46d3 100755 --- a/configure.py +++ b/configure.py @@ -1280,9 +1280,7 @@ 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'] o['variables']['arm_fpu'] = options.arm_fpu or 'neon' if options.node_snapshot_main is not None: diff --git a/node.gyp b/node.gyp index 4aac64089cd3c4..8c4d19b3b19b5b 100644 --- a/node.gyp +++ b/node.gyp @@ -464,6 +464,9 @@ }, 'conditions': [ + ['target_arch=="arm64"', { + 'cflags': ['-mbranch-protection=standard'], # Pointer authentication. + }], ['OS in "aix os400"', { 'ldflags': [ '-Wl,-bnoerrmsg',