1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[cmake] configure the host triple on an Apple Silicon machine correctly

The cmake build of LLVM now uses the appropriate arm64 arch for the
host triple when building llvm-project on an Apple Silicon mac.

Differential Revision: https://reviews.llvm.org/D82428
This commit is contained in:
Alex Lorenz 2020-06-23 21:01:26 -07:00
parent be8b475c4d
commit f1629757c5

17
cmake/config.guess vendored
View File

@ -1263,6 +1263,23 @@ EOF
UNAME_PROCESSOR="x86_64"
fi
fi ;;
arm)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
if (echo '#ifdef __PTRAUTH_INTRINSICS__'; echo HAS_AUTH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep HAS_AUTH >/dev/null
then
UNAME_PROCESSOR="arm64e"
else
UNAME_PROCESSOR="arm64"
fi
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}