Skip to content

Commit

Permalink
Update moore build process for latest code
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
  • Loading branch information
tgorochowik committed Feb 2, 2022
1 parent 878ffa7 commit 504199c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sv-tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 29 additions & 1 deletion tools/runners.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 504199c

Please sign in to comment.