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: #52559
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
devraymondsh committed Apr 24, 2024
1 parent ba252a4 commit cdd03ef
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 cdd03ef

Please sign in to comment.