Building llvm-mos on MacOS

From llvm-mos
Revision as of 09:01, 4 January 2024 by Wombat (talk | contribs) (Add link to llvm building video)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

There is also a video walk-through for MacOS and Linux.