Building llvm-mos on MacOS

From llvm-mos
Jump to navigation Jump to search

The Macintosh build of LLVM is much more forgiving than the Windows build. With the Xcode command-line build tools installed:

cmake ../../llvm -G Ninja -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="MOS" -DLLVM_OPTIMIZED_TABLEGEN=1 -DLLVM_ENABLE_PROJECTS="clang;lld" -DLIBXML2_LIBRARIES=IGNORE -DCMAKE_INSTALL_PREFIX=${WORKSPACE}/build/stage2/install -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=all
cmake --build . --config Release --target check-all
cmake --build . --config Release --target install