Skip to content

Commit 3e652e5

Browse files
authored
Merge pull request The-OpenROAD-Project#3602 from Pinata-Consulting/bazel-build-hack
bazel: add bazel build hack tip
2 parents adc9efc + 0ef98b9 commit 3e652e5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/user/BuildLocally.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ cd OpenROAD-flow-scripts
1212
sudo ./setup.sh
1313
```
1414

15+
## Using Bazel to build OpenROAD and run the ORFS flow
16+
17+
Long story short: OpenROAD will eventually switch to using Bazel for downloading dependencies and building OpenROAD for all the reasons that the DependencyInstaller.sh and cmake are hard to support and brittle across platforms.
18+
19+
Currently the simplest way to build OpenROAD and run ORFS is to run one test, which will download all OpenROAD dependencies and build OpenROAD in the exec configuration:
20+
21+
``` shell
22+
cd tools/OpenROAD
23+
bazelisk test src/drt/...
24+
cd ../../flow
25+
make OPENROAD_EXE=$(pwd)/../tools/OpenROAD/bazel-out/k8-opt-exec-ST-*/bin/openroad
26+
```
27+
28+
Bazel could similarly be used to download and make available pre-built binaries for tools such as Yosys, eqy and KLayout.
29+
30+
Running some quick tests will cause the desired exec config of OpenROAD to be built. There's no explicit Bazel way to build an exec config of an executable and we want to to use an exec config that is the same binary as is used for a local OpenROAD modify + test Bazel cycle.
31+
1532
## Build
1633

1734
``` shell

0 commit comments

Comments
 (0)