Skip to content

Commit 4c86425

Browse files
authored
[NFC][Docs] Update README.md with enhanced build instructions for CIRCT (#9203)
* docs: Update build instructions in README.md for specific tool builds
1 parent dc45595 commit 4c86425

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ For more information, please see our longer [charter document](docs/Charter.md).
5454

5555
## Getting Started
5656

57-
To get started hacking on CIRCT quickly, run the following commands:
57+
To get started hacking on CIRCT quickly, run the following commands. If you want to include `circt-verilog` in the build, add `-DCIRCT_SLANG_FRONTEND_ENABLED=ON` to the cmake call:
5858

5959
```sh
6060
# Clone the repository and its submodules
@@ -69,14 +69,24 @@ cmake -G Ninja llvm/llvm -B build \
6969
-DLLVM_ENABLE_PROJECTS=mlir \
7070
-DLLVM_EXTERNAL_PROJECTS=circt \
7171
-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=$PWD
72+
-DLLVM_ENABLE_LLD=ON
73+
```
7274

73-
# Run the build
75+
If you want to build everything about the CIRCT tools and libraries, run below command(also runs all tests):
76+
```
7477
ninja -C build check-circt
7578
```
7679

77-
The above builds the CIRCT tools and libraries and runs all regression tests.
78-
If you want to include `circt-verilog` in the build, add `-DCIRCT_SLANG_FRONTEND_ENABLED=ON` to the cmake call.
79-
You can ask ninja to only build a specific library or tool, such as `ninja -C build circt-opt`.
80+
If you want to only build a specific part, for example the `circt-opt` tool:
81+
```sh
82+
ninja -C build bin/circt-opt
83+
```
84+
85+
or the `firtool` tool:
86+
```sh
87+
ninja -C build bin/firtool
88+
```
89+
8090
This will only build the necessary parts of LLVM, MLIR, and CIRCT, which can be a lot quicker than building everything.
8191

8292
### Dependencies

0 commit comments

Comments
 (0)