build: fix arm64 cross-compilation bug on non-arm machines

PR-URL: https://github.com/nodejs/node/pull/52559
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Mahdi Sharifi authored and Antoine du Hamel committed 2024-04-29 22:46:30 +02:00
1 parent 43fa6a1a45
commit 4baeb7b21d
1 file changed
+13 -1
+13 -1
View File
@@ -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': [