Skip to content

Commit

Permalink
build: fix arm64 cross-compilation bug on non-arm machines
Browse files Browse the repository at this point in the history
PR-URL: nodejs#52559
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
devraymondsh authored and bmeck committed Jun 22, 2024
1 parent e409581 commit 13e38a7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,20 @@
},

'conditions': [
# Pointer authentication for ARM64.
['target_arch=="arm64"', {
'cflags': ['-mbranch-protection=standard'], # Pointer authentication.
'target_conditions': [
['_toolset=="host"', {
'conditions': [
['host_arch=="arm64"', {
'cflags': ['-mbranch-protection=standard'],
}],
],
}],
['_toolset=="target"', {
'cflags': ['-mbranch-protection=standard'],
}],
],
}],
['OS in "aix os400"', {
'ldflags': [
Expand Down

0 comments on commit 13e38a7

Please sign in to comment.