Skip to content

Commit

Permalink
Add compile.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
leshikus committed Oct 23, 2024
1 parent e40f1ea commit 4010d87
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 40 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
git clone https://github.com/llvm/llvm-project --branch main --single-branch
cd llvm-project
git checkout ${LLVM_SHA}
if [ -d "/home/runner/work/mlir-extensions/mlir-extensions/build_tools/patches" ]; then git apply /home/runner/work/mlir-extensions/mlir-extensions/build_tools/patches/*.patch; fi
git apply /home/runner/work/mlir-extensions/mlir-extensions/build_tools/patches/*.patch
cmake -G Ninja -B _build -S llvm \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DLLVM_ENABLE_PROJECTS=mlir \
Expand All @@ -97,14 +97,7 @@ jobs:
- name: Build IMEX and run lit tests
shell: bash -le {0}
run: |
external_lit=`which lit`
echo ${external_lit}
cd /home/runner/work/mlir-extensions/mlir-extensions
cmake -S . -B _build -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_EXTERNAL_LIT=${external_lit} \
-DMLIR_DIR=/home/runner/work/llvm-mlir/_mlir_install/lib/cmake/mlir \
-DLLVM_LIT_ARGS=-a
./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DLLVM_EXTERNAL_LIT=$(which lit)
cmake --build _build --target check-imex
- name: Build doxygen docs
Expand Down
31 changes: 0 additions & 31 deletions dev_scripts/compile.sh

This file was deleted.

10 changes: 10 additions & 0 deletions scripts/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e
set -vx

cd $(dirname "$0")/..
mlir_dir=$(pwd -P)

cmake -S llvm-project/llvm -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_USE_LINKER=gold -DLLVM_ENABLE_ZSTD=OFF -DLLVM_EXTERNAL_PROJECTS="Imex" -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. "$@"

0 comments on commit 4010d87

Please sign in to comment.