[llvm] 050ed97 - [cmake] configure the host triple on an Apple Silicon machine correctly
Alex Lorenz via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 21:09:00 PDT 2020
Author: Alex Lorenz
Date: 2020-06-23T21:08:11-07:00
New Revision: 050ed9720f84343d859c530b8b692eb6141e6a63
URL: https://github.com/llvm/llvm-project/commit/050ed9720f84343d859c530b8b692eb6141e6a63
DIFF: https://github.com/llvm/llvm-project/commit/050ed9720f84343d859c530b8b692eb6141e6a63.diff
LOG: [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
Added:
Modified:
llvm/cmake/config.guess
Removed:
################################################################################
diff --git a/llvm/cmake/config.guess b/llvm/cmake/config.guess
index 26d120601e49..9fdfcce8d033 100644
--- a/llvm/cmake/config.guess
+++ b/llvm/cmake/config.guess
@@ -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}
More information about the llvm-commits
mailing list