forked from j2kun/mlir-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_debug_cmake.sh
More file actions
executable file
·35 lines (29 loc) · 1000 Bytes
/
Copy pathbuild_debug_cmake.sh
File metadata and controls
executable file
·35 lines (29 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
BUILD_SYSTEM=Ninja
BUILD_TAG=ninja
THIRDPARTY_LLVM_DIR=$PWD/externals/llvm-project
BUILD_DIR=$THIRDPARTY_LLVM_DIR/build
INSTALL_DIR=$THIRDPARTY_LLVM_DIR/install
mkdir -p $BUILD_DIR
mkdir -p $INSTALL_DIR
pushd $BUILD_DIR
cmake ../llvm -G $BUILD_SYSTEM \
-DCMAKE_CXX_COMPILER="$(which clang++-18)" \
-DCMAKE_C_COMPILER="$(which clang-18)" \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DLLVM_LOCAL_RPATH=$INSTALL_DIR/lib \
-DLLVM_TARGETS_TO_BUILD="Native;NVPTX;AMDGPU" \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_INSTALL_UTILS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_CCACHE_BUILD=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DLLVM_ENABLE_PROJECTS='mlir' \
-DLLVM_CCACHE_DIR=$HOME/ccache \
-DLLVM_ENABLE_LLD=ON \
-DLLVM_USE_SPLIT_DWARF=ON \
-DMLIR_INCLUDE_INTEGRATION_TESTS=ON \
-DLLVM_USE_SANITIZER="Address;Undefined"
cmake --build . --target check-mlir
popd