diff --git a/.github/workflows/sv-tests-ci.yml b/.github/workflows/sv-tests-ci.yml index 1320b45abc338..cc53f74295251 100644 --- a/.github/workflows/sv-tests-ci.yml +++ b/.github/workflows/sv-tests-ci.yml @@ -17,7 +17,7 @@ jobs: - name: icarus deps: autoconf autotools-dev bison flex libfl-dev gperf - name: moore - deps: cargo + deps: cargo cmake - name: odin repo: odin_ii deps: autoconf autotools-dev bison flex libfl-dev cmake pkg-config diff --git a/tools/runners.mk b/tools/runners.mk index 22c6ec09e924d..066d88f5eaa29 100644 --- a/tools/runners.mk +++ b/tools/runners.mk @@ -132,7 +132,35 @@ $(INSTALL_DIR)/bin/parse_sv: moore: $(INSTALL_DIR)/bin/moore $(INSTALL_DIR)/bin/moore: - cargo install --path $(RDIR)/moore --root $(INSTALL_DIR) --bin moore + mkdir -p $(INSTALL_DIR) + mkdir -p $(RDIR)/moore/circt/llvm/build + (cd $(RDIR)/moore/circt/llvm/build && \ + cmake ../llvm \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$(RDIR)/moore/circt/llvm/install \ + -DLLVM_BUILD_EXAMPLES=OFF \ + -DLLVM_ENABLE_ASSERTIONS=ON \ + -DLLVM_ENABLE_BINDINGS=OFF \ + -DLLVM_ENABLE_OCAMLDOC=OFF \ + -DLLVM_ENABLE_PROJECTS=mlir \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_OPTIMIZED_TABLEGEN=ON \ + -DLLVM_TARGETS_TO_BUILD="" && \ + cmake --build . --target install) + mkdir -p $($RDIR)/moore/circt/build + (cd $($RDIR)/moore/circt/build && \ + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$(RDIR)/moore/circt/install \ + -DMLIR_DIR=$(RDIR)/moore/circt/llvm/install/lib/cmake/mlir \ + -DLLVM_DIR=$(RDIR)/moore/circt/llvm/install/lib/cmake/llvm \ + -DLLVM_ENABLE_ASSERTIONS=ON && \ + cmake --build . --target install) + (export CIRCT_SYS_CIRCT_DIR=$(RDIR)/moore/circt && \ + export CIRCT_SYS_CIRCT_BUILD_DIR=$(RDIR)/moore/circt/install && \ + export CIRCT_SYS_LLVM_DIR=$(RDIR)/moore/circt/llvm && \ + export CIRCT_SYS_LLVM_BUILD_DIR=$(RDIR)/moore/circt/llvm/install && \ + cargo install --path $(RDIR)/moore --root $(INSTALL_DIR) --bin moore) # verible verible: