build: consider x86_64 on aarch64 darwin to not be a cross-compile

This commit is contained in:
Alex Zenla 2024-03-21 18:39:06 -07:00
parent 370ec8bbe6
commit b5f1d9edb0
No known key found for this signature in database
GPG Key ID: 067B238899B51269

View File

@ -21,6 +21,14 @@ then
TARGET_OS="${HOST_OS}"
fi
# Darwin can cross compile on all architectures to all other supported
# architectures without cross compilation consideration. For cross-compile
# check, make sure HOST_ARCH is TARGET_ARCH for comparison.
if [ "${TARGET_OS}" = "darwin" ]
then
HOST_ARCH="${TARGET_ARCH}"
fi
if [ "${HOST_ARCH}" != "${TARGET_ARCH}" ] || [ "${HOST_OS}" != "${TARGET_OS}" ]
then
echo "1"