Last active
August 8, 2024 06:12
-
-
Save junaire/b631fb13d01ffe8b5753a3ee2bf54474 to your computer and use it in GitHub Desktop.
Commands used to build LLVM and Clang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/llvm/llvm-project.git | |
cd llvm-project | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=YES \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DLLVM_USE_LINKER=lld \ | |
-DLLVM_CCACHE_BUILD=ON \ | |
-DLLVM_APPEND_VC_REV=OFF \ | |
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" \ | |
-DLLVM_TARGETS_TO_BUILD="host;AArch64;NVPTX;RISCV" \ | |
-DLLVM_OPTIMIZED_TABLEGEN=ON \ | |
-GNinja ../../llvm && ninja | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LLVM_CCACHE_BUILD is deprecated