Skip to content

Commit 9e6c250

Browse files
committed
android,build: dont set a certain cflag globally
This fixes "msign-return-address=all" unrecognized by g++ for obj.host Basically copied from nodejs/node#45756
1 parent e48263f commit 9e6c250

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

configure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,8 @@ def configure_node(o):
12931293

12941294
# Enable branch protection for arm64
12951295
if target_arch == 'arm64':
1296-
o['cflags']+=['-msign-return-address=all']
1296+
# nodejs-mobile patch: from https://github.com/nodejs/node/pull/45756
1297+
# o['cflags']+=['-msign-return-address=all']
12971298
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'
12981299

12991300
if options.node_snapshot_main is not None:

node.gyp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113
},
114114

115115
'conditions': [
116+
# nodejs-mobile patch: from https://github.com/nodejs/node/pull/45756
117+
['target_arch=="arm64"', {
118+
'cflags': ['-msign-return-address=all'], # Pointer authentication.
119+
}],
116120
['OS in "aix os400"', {
117121
'ldflags': [
118122
'-Wl,-bnoerrmsg',

0 commit comments

Comments
 (0)