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 2024-04-24 10:00:02 +03:30 committed by GitHub
parent ba252a45d6
commit cdd03ef395
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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': [