Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't cmake if it has been built
Browse files Browse the repository at this point in the history
kumasento committed Sep 13, 2021

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 52012af commit e5dd691
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions scripts/build-llvm.sh
Original file line number Diff line number Diff line change
@@ -36,21 +36,23 @@ mkdir -p build
cd build

# Configure CMake
export CC=gcc
export CXX=g++
cmake ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir;llvm;clang" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DBUILD_POLYMER=ON \
-DPLUTO_LIBCLANG_PREFIX="$(llvm-config --prefix)" \
-G "${CMAKE_GENERATOR}"
if [ ! -f "CMakeCache.txt" ]; then
export CC=gcc
export CXX=g++
cmake ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir;llvm;clang" \
-DCMAKE_BUILD_TYPE=RELEASE \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DBUILD_POLYMER=ON \
-DPLUTO_LIBCLANG_PREFIX="$(llvm-config --prefix)" \
-G "${CMAKE_GENERATOR}"
fi

# Run building
cmake --build . --target all -- -j "$(nproc)"

0 comments on commit e5dd691

Please sign in to comment.