Skip to content

Commit 504199c

Browse files
committed
Update moore build process for latest code
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
1 parent 878ffa7 commit 504199c

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/sv-tests-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: icarus
1818
deps: autoconf autotools-dev bison flex libfl-dev gperf
1919
- name: moore
20-
deps: cargo
20+
deps: cargo cmake
2121
- name: odin
2222
repo: odin_ii
2323
deps: autoconf autotools-dev bison flex libfl-dev cmake pkg-config

tools/runners.mk

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,35 @@ $(INSTALL_DIR)/bin/parse_sv:
132132
moore: $(INSTALL_DIR)/bin/moore
133133

134134
$(INSTALL_DIR)/bin/moore:
135-
cargo install --path $(RDIR)/moore --root $(INSTALL_DIR) --bin moore
135+
mkdir -p $(INSTALL_DIR)
136+
mkdir -p $(RDIR)/moore/circt/llvm/build
137+
(cd $(RDIR)/moore/circt/llvm/build && \
138+
cmake ../llvm \
139+
-DCMAKE_BUILD_TYPE=Release \
140+
-DCMAKE_INSTALL_PREFIX=$(RDIR)/moore/circt/llvm/install \
141+
-DLLVM_BUILD_EXAMPLES=OFF \
142+
-DLLVM_ENABLE_ASSERTIONS=ON \
143+
-DLLVM_ENABLE_BINDINGS=OFF \
144+
-DLLVM_ENABLE_OCAMLDOC=OFF \
145+
-DLLVM_ENABLE_PROJECTS=mlir \
146+
-DLLVM_INSTALL_UTILS=ON \
147+
-DLLVM_OPTIMIZED_TABLEGEN=ON \
148+
-DLLVM_TARGETS_TO_BUILD="" && \
149+
cmake --build . --target install)
150+
mkdir -p $($RDIR)/moore/circt/build
151+
(cd $($RDIR)/moore/circt/build && \
152+
cmake .. \
153+
-DCMAKE_BUILD_TYPE=Release \
154+
-DCMAKE_INSTALL_PREFIX=$(RDIR)/moore/circt/install \
155+
-DMLIR_DIR=$(RDIR)/moore/circt/llvm/install/lib/cmake/mlir \
156+
-DLLVM_DIR=$(RDIR)/moore/circt/llvm/install/lib/cmake/llvm \
157+
-DLLVM_ENABLE_ASSERTIONS=ON && \
158+
cmake --build . --target install)
159+
(export CIRCT_SYS_CIRCT_DIR=$(RDIR)/moore/circt && \
160+
export CIRCT_SYS_CIRCT_BUILD_DIR=$(RDIR)/moore/circt/install && \
161+
export CIRCT_SYS_LLVM_DIR=$(RDIR)/moore/circt/llvm && \
162+
export CIRCT_SYS_LLVM_BUILD_DIR=$(RDIR)/moore/circt/llvm/install && \
163+
cargo install --path $(RDIR)/moore --root $(INSTALL_DIR) --bin moore)
136164

137165
# verible
138166
verible:

0 commit comments

Comments
 (0)