From c95a1976c9b47a4fd46f8ad006ef5aaa4f84a3d5 Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Tue, 30 Jan 2024 16:16:28 +0000 Subject: [PATCH] cmake opts --- .github/workflows/basic.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 337856e1f..7a6bbe5a5 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -8,6 +8,20 @@ on: pull_request: branches: [ "ghactions" ] +env: + # clang, gcc + CC: clang + CXX: clang++ + # ld, gold, lld + LD: lld + # Release, Debug, RelWithDebInfo + BUILD: RelWithDebInfo + # "Address;Memory;Leak;Undefined" + SAN: "" + # ON, OFF + OPENMP: OFF + ONEDNN: OFF + jobs: build_tpp_mlir: runs-on: self-hosted @@ -28,9 +42,14 @@ jobs: run: | mkdir -p build cmake -G Ninja -B build . \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DMLIR_DIR=${{ env.LLVM_DIR }}/lib/cmake/mlir \ - -DLLVM_EXTERNAL_LIT=${{ env.LLVM_LIT }} + -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_BUILD_TYPE=${BUILD} \ + -DMLIR_DIR=${{ env.LLVM_DIR }}/lib/cmake/mlir \ + -DLLVM_EXTERNAL_LIT=${{ env.LLVM_LIT }} \ + -DLLVM_USE_LINKER=${LD} \ + -DUSE_SANITIZER=${SAN} \ + -DUSE_OpenMP=${OPENMP} \ + -DUSE_OneDNN=${ONEDNN} - name: Build run: ninja -C build all