Last active
May 30, 2023 21:17
-
-
Save aaronpuchert/ba9b6c1319d3d1e25a1e8c5acbf5191b to your computer and use it in GitHub Desktop.
Build LLVM mono repository from root directory
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
add_subdirectory(llvm) |
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
#!/bin/bash | |
BUILD_DIR=build | |
if (( $# >= 1 )); then | |
BUILD_DIR=$1 | |
shift | |
fi | |
TARGETS=X86 | |
PROJECTS=clang | |
mkdir $BUILD_DIR | |
cd $BUILD_DIR | |
ln -s llvm/bin bin | |
ln -s llvm/lib lib | |
cmake -G Ninja \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DBUILD_SHARED_LIBS:BOOL=ON \ | |
-DCMAKE_LINK_DEPENDS_NO_SHARED:BOOL=ON \ | |
-DLLVM_TARGETS_TO_BUILD="$TARGETS" \ | |
-DLLVM_ENABLE_PROJECTS="$PROJECTS" \ | |
-DCLANG_ENABLE_ARCMT:BOOL=OFF \ | |
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \ | |
-DLLVM_ENABLE_LLD:BOOL=ON \ | |
-DLLVM_USE_SPLIT_DWARF:BOOL=ON \ | |
-DLLVM_BUILD_DOCS:BOOL=ON \ | |
-DLLVM_ENABLE_DOXYGEN:BOOL=ON \ | |
-DLLVM_ENABLE_SPHINX:BOOL=ON \ | |
-DLLVM_DOXYGEN_SVG:BOOL=ON \ | |
$@ .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment