Skip to content

Commit 4baeb7b

Browse files
devraymondshaduh95
authored andcommitted
build: fix arm64 cross-compilation bug on non-arm machines
PR-URL: #52559 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 43fa6a1 commit 4baeb7b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

node.gyp

+13-1
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,20 @@
482482
},
483483

484484
'conditions': [
485+
# Pointer authentication for ARM64.
485486
['target_arch=="arm64"', {
486-
'cflags': ['-mbranch-protection=standard'], # Pointer authentication.
487+
'target_conditions': [
488+
['_toolset=="host"', {
489+
'conditions': [
490+
['host_arch=="arm64"', {
491+
'cflags': ['-mbranch-protection=standard'],
492+
}],
493+
],
494+
}],
495+
['_toolset=="target"', {
496+
'cflags': ['-mbranch-protection=standard'],
497+
}],
498+
],
487499
}],
488500
['OS in "aix os400"', {
489501
'ldflags': [

0 commit comments

Comments
 (0)