Skip to content

Commit 6826bbf

Browse files
devraymondshmarco-ippolito
authored andcommitted
build: fix arm64 cross-compilation bug on non-arm machines
PR-URL: #52559 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 6af7b78 commit 6826bbf

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
@@ -466,8 +466,20 @@
466466
},
467467

468468
'conditions': [
469+
# Pointer authentication for ARM64.
469470
['target_arch=="arm64"', {
470-
'cflags': ['-mbranch-protection=standard'], # Pointer authentication.
471+
'target_conditions': [
472+
['_toolset=="host"', {
473+
'conditions': [
474+
['host_arch=="arm64"', {
475+
'cflags': ['-mbranch-protection=standard'],
476+
}],
477+
],
478+
}],
479+
['_toolset=="target"', {
480+
'cflags': ['-mbranch-protection=standard'],
481+
}],
482+
],
471483
}],
472484
['OS in "aix os400"', {
473485
'ldflags': [

0 commit comments

Comments
 (0)