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

View File

@ -21,6 +21,14 @@ then
TARGET_OS="${HOST_OS}" TARGET_OS="${HOST_OS}"
fi 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}" ] if [ "${HOST_ARCH}" != "${TARGET_ARCH}" ] || [ "${HOST_OS}" != "${TARGET_OS}" ]
then then
echo "1" echo "1"