You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ece2914
Browse filesBrowse the repository at this point in the historyBrowse files
Add -bazel flag to skip OpenROAD build dependencies
Add -bazel option to DependencyInstaller.sh and setup.sh that skips
OpenROAD-specific build dependencies (boost, swig, spdlog, eigen,
or-tools, etc.) which Bazel manages, while still installing flow-level
dependencies and building Yosys/eqy/sby.
This supports the new `bazelisk run //:setup-orfs` target in OpenROAD
which provides a single entry point for developer environment setup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Copy file name to clipboardExpand all lines: docs/user/BuildLocally.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,47 @@ sudo ./setup.sh
14
14
15
15
## Using Bazel to build OpenROAD and run the ORFS flow
16
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.
17
+
OpenROAD is switching to Bazel for dependency management and building.
18
+
Bazel eliminates the need for the complex `DependencyInstaller.sh` and
19
+
cmake toolchain for OpenROAD itself.
18
20
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:
21
+
### Setup
22
+
23
+
Install ORFS flow dependencies with user permissions:
24
+
25
+
```shell
26
+
cd tools/OpenROAD
27
+
bazelisk run //:setup-orfs
28
+
```
29
+
30
+
If system packages are missing, the command prints the exact `sudo` command
31
+
to run and exits. This way the user sees what will be installed with root
32
+
privileges before it happens — nothing is silently written to system
33
+
directories. In educational and corporate environments where `sudo` is
34
+
controlled by IT policy, the printed command can be handed off to an
35
+
administrator. Running `sudo` separately also benefits from the system's
36
+
apt cache on repeated runs. User-level tools (Yosys, eqy, sby) are built
37
+
into the project's `dependencies/` directory with user permissions only.
38
+
39
+
After installing system packages, re-run `bazelisk run //:setup-orfs` to
40
+
complete setup.
41
+
42
+
This installs the minimum tooling that Bazel does not yet manage (currently
43
+
Yosys, eqy, sby, KLayout, and Python packages). Over time, more of these
44
+
may move into Bazel, but that is an implementation detail — this command
45
+
remains the single entry point for developers.
46
+
47
+
### Build OpenROAD and run the flow
48
+
49
+
```shell
50
+
cd tools/OpenROAD
51
+
bazelisk run --//:platform=gui //:install
52
+
cd ../../flow
53
+
source ../env.sh
54
+
make
55
+
```
56
+
57
+
Or without installing, run an ORFS flow using the exec-built OpenROAD:
20
58
21
59
```shell
22
60
cd tools/OpenROAD
@@ -25,8 +63,6 @@ cd ../../flow
25
63
make OPENROAD_EXE=$(pwd)/../tools/OpenROAD/bazel-out/k8-opt-exec-ST-*/bin/openroad
26
64
```
27
65
28
-
Bazel could similarly be used to download and make available pre-built binaries for tools such as Yosys, eqy and KLayout.
29
-
30
66
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.
0 commit comments