Skip to content

LLVM 13.0.0 Apple M1

Compare
Choose a tag to compare
@gregmagolan gregmagolan released this 10 Feb 02:33
· 25245 commits to main since this release

Build on an Apple M1 Macbook Air running macOS 11.6 with the following recipe:

cmake ../llvm \
      -GNinja -B ninja_build \
      -DDEFAULT_SYSROOT=$(xcrun --show-sdk-path) \
      -DCMAKE_OSX_ARCHITECTURES='arm64' \
      -DCMAKE_C_COMPILER=`which clang` \
      -DCMAKE_CXX_COMPILER=`which clang++` \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 \
      -DLLVM_ENABLE_WERROR=FALSE \
      -DLLVM_TARGETS_TO_BUILD='X86;AArch64' \
      -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;compiler-rt;lld;openmp;polly;pstl;libcxx;libcxxabi' \
      -DLLVM_DEFAULT_TARGET_TRIPLE='arm64-apple-macosx'

cd ninja_build
cmake --build .
cmake -DCMAKE_INSTALL_PREFIX=/tmp/llvm/clang+llvm-13.0.0-arm64-apple-darwin -P cmake_install.cmake

cd /tmp/llvm
tar cf - clang+llvm-13.0.0-arm64-apple-darwin | xz -4e > clang+llvm-13.0.0-arm64-apple-darwin.tar.xz