Skip to content

Commit

Permalink
readme: Update LLVM/CIRCT build instructions
Browse files Browse the repository at this point in the history
Don't install LLVM/CIRCT to a local `install` directory, as this tends
to break things in subtle ways. Will need a fix for this eventually, but
not today.
  • Loading branch information
fabianschuiki committed Jul 12, 2022
1 parent 6052a23 commit 064d55b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ And then follow these steps:
pushd circt/llvm/build
cmake ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../install \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_BINDINGS=OFF \
Expand All @@ -33,7 +32,7 @@ And then follow these steps:
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_TARGETS_TO_BUILD="host"
cmake --build . --target install
cmake --build .
popd

#### Build CIRCT
Expand All @@ -42,21 +41,20 @@ And then follow these steps:
pushd circt/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../install \
-DMLIR_DIR=$PWD/../llvm/install/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../llvm/install/lib/cmake/llvm \
-DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON
cmake --build . --target install
cmake --build .
popd

#### Build Moore

Set the following environment variables to indicate where your LLVM and CIRCT build is:

export CIRCT_SYS_CIRCT_DIR=$PWD/circt
export CIRCT_SYS_CIRCT_BUILD_DIR=$PWD/circt/install
export CIRCT_SYS_CIRCT_BUILD_DIR=$PWD/circt/build
export CIRCT_SYS_LLVM_DIR=$PWD/circt/llvm
export CIRCT_SYS_LLVM_BUILD_DIR=$PWD/circt/llvm/install
export CIRCT_SYS_LLVM_BUILD_DIR=$PWD/circt/llvm/build

Use cargo to install Moore:

Expand Down

0 comments on commit 064d55b

Please sign in to comment.