Skip to content

Commit 00f2aa2

Browse files
malibertymikesinouye
authored andcommitted
Merge branch 'master' of https://github.com/The-OpenROAD-Project/OpenROAD into pr12045-merge
Signed-off-by: Matt Liberty <mliberty@precisioninno.com> # Conflicts: # src/web/test/cpp/TestSaveImage.cpp
2 parents b2d4d4c + c22160a commit 00f2aa2

814 files changed

Lines changed: 42904 additions & 50886 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/add-test/SKILL.md‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: add-test
33
description: >
44
Add integration or unit tests to an OpenROAD module. Handles the
55
complete workflow: writing the Tcl/C++ test, generating golden files,
6-
and registering the test in Bazel (CMake is deprecated and CMake
7-
test registration is not required). Use when asked
6+
and registering the test in Bazel. Use when asked
87
to add tests, improve test coverage, create regression tests, or write
98
unit tests for any OpenROAD module (ant, cts, dpl, drt, gpl, grt, mpl,
109
odb, pad, pdn, psm, rcx, rsz, sta, stt, tap, upf, utl, etc.).
@@ -91,10 +90,7 @@ If the test uses `diff_file`, also generate the golden output file
9190
## 4. Register in Bazel
9291

9392
Register every test in Bazel. A test missing from `BUILD` does not run in
94-
CI. CMake is deprecated and will be removed on Nov. 1, 2026, so CMake
95-
test registration is not required. This applies to tests only. A new
96-
source file or tool still needs its CMake entry until CMake is removed,
97-
because the macOS CI job builds with CMake (it runs no `ctest`).
93+
CI.
9894

9995
### Bazel -- `src/MODULE/test/BUILD`
10096

@@ -142,10 +138,6 @@ comprehension iterates over. Read the existing `BUILD` to find which list
142138
to extend, and insert the new test name in whatever sort order that
143139
file already uses (most modules are alphabetical).
144140

145-
### CMake (deprecated, not required)
146-
147-
Skip `src/MODULE/test/CMakeLists.txt`. The macOS CI job runs no `ctest`.
148-
149141
## 5. Write unit tests (C++, if applicable)
150142

151143
Prefer C++ unit tests over Tcl for testing internal logic, algorithms,
@@ -224,10 +216,6 @@ cc_test(
224216
)
225217
```
226218

227-
CMake test registration is not required. The deprecated CMake build uses
228-
`add_executable`, `gtest_discover_tests`, and `add_dependencies` in
229-
`src/MODULE/test/cpp/CMakeLists.txt`.
230-
231219
## 6. Run and verify
232220

233221
Run a Tcl or Python test by its Bazel target name. Add
@@ -246,10 +234,6 @@ bazelisk test //src/MODULE/test/...
246234
bazelisk query //src/MODULE/test:all | grep TEST_NAME
247235
```
248236

249-
Legacy (CMake only, deprecated): `./regression -R TEST_NAME` in
250-
`src/MODULE/test` runs `ctest` in `build/`. It does not see Bazel
251-
targets.
252-
253237
## 7. Format and commit
254238

255239
```bash
@@ -269,7 +253,6 @@ Test for DESCRIPTION."
269253
- [ ] Test runs successfully: `bazelisk test //src/MODULE/test:TEST_NAME-tcl_test`
270254
- [ ] Golden file generated and committed
271255
- [ ] Registered in Bazel `BUILD`
272-
- [ ] CMake test registration is skipped (not required); new source files or tools still need their CMake entry
273256
- [ ] Test data is minimal (reuse existing files when possible)
274257
- [ ] C++ files formatted with clang-format
275258
- [ ] Commit is signed off (`-s`)

‎.agents/skills/fix-bug/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: fix-bug
33
description: >
44
Fix an OpenROAD bug from a GitHub issue. Analyzes the issue, traces the
55
root cause through the codebase, implements the fix, creates regression
6-
tests (registered in Bazel; CMake is deprecated), runs clang-format, and
6+
tests (registered in Bazel), runs clang-format, and
77
prepares a signed-off commit. Use when given a bug report issue number,
88
error code (e.g. GPL-0305, DRT-0001, RSZ-2007), or when asked to fix a
99
bug in any OpenROAD module (ant, cts, dpl, drt, gpl, grt, mpl, odb,
@@ -68,7 +68,7 @@ future regression is caught immediately.
6868

6969
Use the **add-test** skill (`.agents/skills/add-test/SKILL.md`) for the
7070
full workflow: writing the test, generating golden files, and
71-
registering in Bazel (CMake test registration is not required).
71+
registering in Bazel.
7272

7373
## 5. Format and commit
7474

‎.agents/skills/review-pr/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Any change affecting placement, routing, timing, or physical design:
7676
### Priority 3: Testing
7777

7878
- Does every code change have an accompanying test?
79-
- Are tests registered in **Bazel** (`BUILD`)? CMake is deprecated; do not ask for CMake test registration. A new source file or tool still needs its CMake entry (the macOS CI job builds with CMake).
79+
- Are tests, new source files and new tools registered in **Bazel** (`BUILD`)?
8080
- Do golden files look reasonable?
8181
- Are test inputs minimal?
8282

‎.bazelignore‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
# Build outputs from CMake
1+
# Old CMake build trees left in existing checkouts.
22
build/
33
debug/
44
src/sta/build/
55
src/sta/debug/
66

7-
# standalone workspace for downstream consumer tests
8-
test/downstream/
9-
10-
# Various things from third-party/ that might be used by CMake, but
11-
# we have in MODULE.bazel.
12-
# Goal: no sub-modules, only bazel-managed dependencies.
7+
# Former submodules and CMake-only sources. git leaves them on disk in
8+
# existing checkouts and reused CI runners; Bazel takes these from MODULE.bazel.
139
third-party/abc/
1410
third-party/lemon/
15-
16-
# Prevent //... from walking into sv-elab as its BUILD files expect
17-
# sv-elab is the root
1811
third-party/sv-elab/
1912

13+
# standalone workspace for downstream consumer tests
14+
test/downstream/
15+
2016
# Other things to ignore
2117
tmp/

‎.bazelrc‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,18 @@ build:profile --copt -fno-omit-frame-pointer --host_copt -fno-omit-frame-pointer
230230
# Compress the DWARF debug sections (transparent to gdb/perf/addr2line).
231231
build:profile --copt=-gz=zlib --host_copt=-gz=zlib
232232
build:profile --linkopt=-gz=zlib
233+
# Links //:openroad with --no-rosegment on Linux so VTune resolves symbols
234+
# (see OPENROAD_LINKOPTS in BUILD.bazel).
235+
build:profile --//:profile
233236

234237
# Settings for --config=coverage C++ coverage build (LLVM source-based).
235238
# Usage: bazel coverage --config=coverage //...
236239
# `bazel coverage` already layers the `test` config on top of `build`, so this
237240
# only adds the coverage-specific bits. --combined_report=lcov merges every
238241
# test's per-target lcov into one file at
239242
# bazel-out/_coverage/_coverage_report.dat, which CI renders with genhtml
240-
# (lcov is installed in bazel/Dockerfile). The instrumentation_filter mirrors
241-
# the exclusions of the retired cmake/lcov flow (etc/CodeCoverage.sh _lcov):
242-
# instrument OpenROAD's own //src/... code, minus OpenSTA (src/sta, which has
243+
# (lcov is installed in bazel/Dockerfile). The instrumentation_filter
244+
# instruments OpenROAD's own //src/... code, minus OpenSTA (src/sta, which has
243245
# its own private test suite) and drt's unused global-routing code. Third-party
244246
# deps live under external repos / //third-party and are simply never matched
245247
# by //src, so they need no explicit exclusion.
@@ -267,6 +269,12 @@ test --build_tests_only
267269
# Use a high number of jobs and let the scheduler manage concurrency
268270
build --jobs=200
269271

272+
# CopyToDirectory staging (e.g. the hermetic toolchain's libc++ header tree,
273+
# ~1,700 files) is a sub-second local copy, but a cache hit has to check every
274+
# file in the tree. On a cold or busy disk cache that takes minutes, and every
275+
# C++ compile waits on it. Run it locally instead.
276+
build --modify_execution_info=CopyToDirectory=+no-cache
277+
270278
# Enable local disk caching to supplement the remote cache.
271279
build --disk_cache=~/.cache/bazel-disk-cache
272280
build --repository_cache=~/.cache/bazel-repository-cache

‎.gemini/styleguide.md‎

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,45 @@ Follow [CONTRIBUTING.md](../CONTRIBUTING.md): correctness, quality of results
44
(QoR), testing, architecture, style, then process. This guide supplements those
55
priorities; it does not replace module-specific conventions or maintainer decisions.
66

7+
A wrong comment costs the author time to refute it, and a wrong comment that
8+
gets followed costs more: it can turn a loud failure into a silent wrong result.
9+
The rules below are hard stops; a comment that breaks one is not posted.
10+
11+
## Hard stops: never suggest silencing an error
12+
13+
OpenROAD wants loud, early failures. A broken invariant stops the tool where it
14+
is broken, with a message that names it.
15+
16+
- Never suggest a guard that hides an impossible state: a null check, an empty,
17+
zero or negative check, or a missing-key check that returns a default, skips,
18+
clamps, `continue`s or logs a warning and carries on. A null dereference that
19+
is reachable is reported with its triggering input; the fix is
20+
`logger_->error(...)` or an assert, never a silent default.
21+
- Never suggest catching and discarding an exception or error code, or a
22+
fallback path ("if this fails, do it the slow way") that runs without saying so.
23+
- `Logger::error()` throws and does not return. Code after it is unreachable;
24+
do not suggest a `return` after it or treat it as a warning.
25+
726
## Ground findings in the current code
827

928
- Read the complete affected function and relevant callers, not only the diff.
1029
Identify a triggering input, reachable failure path, and consequence; cite the
1130
current revision and relevant lines. A hypothetical risk is not an established bug.
12-
- Before reporting a null dereference, trace guards, early returns, and callees.
13-
A null value can represent an intentionally supported no-merge or no-op case.
14-
Rejecting it unconditionally can remove useful behavior.
31+
- Before reporting a bug, trace guards, early returns, callees and the
32+
invariants the caller establishes. Before claiming a symbol, option, include
33+
or file is missing, or that code does not compile, find its definition. CI
34+
compiles every PR; a claimed compile error names the rule of the language
35+
it breaks.
1536
- Compare eligibility checks with their mutations. For buffer removal, distinguish
1637
flat nets from hierarchical ModNets and preserve protection and feedthrough semantics.
1738
- Verify language assumptions against the active target's build configuration,
1839
including [.bazelrc](../.bazelrc) and its BUILD file. OpenROAD uses C++20;
19-
do not apply a generic prohibition against valid C++20 features.
40+
do not apply a generic prohibition against valid C++20 features (`std::ranges`,
41+
`std::span`, concepts). OpenROAD builds on Linux with GCC and Clang; Windows,
42+
MSVC, RHEL 7/CentOS 7 and paths with spaces are not supported.
43+
- Before suggesting a Bazel change, check the rule's documented semantics
44+
(`genrule` `$(@D)`, `copts` quoting) and whether the BUILD file is in a
45+
deliberate transitional state.
2046

2147
## Check evidence and keep comments useful
2248

@@ -26,7 +52,13 @@ priorities; it does not replace module-specific conventions or maintainer decisi
2652
- For changes affecting placement, routing, or timing, inspect downstream QoR and
2753
runtime evidence across representative designs and technologies. A local unit
2854
test or one favorable design does not establish an overall improvement.
55+
- Do not suggest a change that alters QoR or golden files (float to double
56+
accumulation, reordered iteration) as a side remark; that is a PR of its own
57+
with data. Do not suggest a performance change without a hot path to point at.
58+
- Comment on what the PR changes, not on pre-existing code, code moved
59+
verbatim or vendored files.
2960
- Do not repeat resolved findings or style checks already handled by clang-format
30-
and clang-tidy. Check the current discussion before adding a comment.
61+
and clang-tidy. Check the current discussion before adding a comment. Read
62+
earlier review rounds; never ask to undo a change an earlier round asked for.
3163
- When relevant caller behavior is unknown, ask one precise question rather than
3264
asserting a crash. Keep comments concise and omit unsolicited PR summaries.

‎.gitattributes‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# Per-module owners
1111
/src/ant/ @The-OpenROAD-Project/openroad-ant
1212
/src/cgt/ @The-OpenROAD-Project/openroad-cgt
13-
/src/cmake/ @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
1413
/src/cts/ @The-OpenROAD-Project/openroad-cts
1514
/src/cut/ @The-OpenROAD-Project/openroad-cut
1615
/src/dbSta/ @The-OpenROAD-Project/openroad-dbsta
@@ -68,18 +67,12 @@
6867
/bazel/ @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
6968
/tools/ @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
7069

71-
# CMake build system, shared with the build maintainers
70+
# Vestigial CMakeLists.txt that points to the Bazel build
7271
/CMakeLists.txt @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
73-
/CMakeGraphVizOptions.cmake @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
74-
/cmake/ @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
75-
/src/CMakeLists.txt @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
7672

7773
# Dependency pins and vendored code
7874
/.gitmodules @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
7975
/third-party/ @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
80-
/flake.nix @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
81-
/flake.lock @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
82-
/default.nix @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
8376
/pyproject.toml @The-OpenROAD-Project/openroad-devops @The-OpenROAD-Project/openroad-maintainers
8477

8578
# Documentation build

‎.github/dependabot.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ updates:
3333
- "*"
3434

3535
- package-ecosystem: "npm"
36-
# A /src/web bump fails the bundle check until src/web/dist is rebuilt, by
37-
# the steps in src/web/dist/README.md.
3836
directories:
3937
- "/src/web"
4038
- "/src/web/test"

‎.github/workflows/github-actions-are-odb-files-generated.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ jobs:
2828
source venv/bin/activate
2929
cd src/odb/src/codeGenerator/
3030
./generate
31-
if [ -z "$(git status --porcelain)" ]; then
31+
# Only src/odb: a reused self-hosted checkout can hold stale files elsewhere.
32+
if [ -z "$(git status --porcelain -- :/src/odb)" ]; then
3233
exit 0
3334
else
3435
echo ::group::Non-Empty Git Status Oputput
35-
git status --porcelain
36+
git status --porcelain -- :/src/odb
3637
echo ::endgroup::
3738
3839
echo ::group::Non-Empty Git Diff Oputput
39-
git diff
40+
git diff -- :/src/odb
4041
echo ::endgroup::
4142
4243
printf "Your ODB generated files are out of date\n"

0 commit comments

Comments
 (0)