Skip to content

Commit f9466bb

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project/OpenROAD into gpl-virtual-cts
2 parents 4506a93 + 4db8ad9 commit f9466bb

667 files changed

Lines changed: 59851 additions & 26084 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.

.bazelrc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ common --enable_bzlmod
55
# Remove this registry line once the version lands on BCR.
66
common --registry=https://raw.githubusercontent.com/oharboe/bazel-central-registry/1beaf797951046d93a2f656d4238c954a21833e5/
77
common --registry=https://bcr.bazel.build/
8+
9+
# abc is driven programmatically by OpenROAD, so skip the interactive
10+
# readline dependency exposed by abc@0.64-yosyshq.bcr.2.
11+
common --@abc//:use_readline=false
812
build --workspace_status_command=tools/workspace_status.sh
913

1014
# Release builds embed real git version info; dev builds use cache-safe placeholders.
@@ -46,6 +50,16 @@ build --cxxopt=-fexceptions --host_cxxopt=-fexceptions
4650
build --copt "-Wall" --host_copt "-Wall"
4751
build --copt "-Wextra" --host_copt "-Wextra"
4852

53+
# Treat specific warnings as errors
54+
build --copt "-Werror=array-bounds" --host_copt "-Werror=array-bounds"
55+
build --copt "-Werror=dangling" --host_copt "-Werror=dangling"
56+
build --copt "-Werror=dangling-assignment" --host_copt "-Werror=dangling-assignment"
57+
build --copt "-Werror=dangling-assignment-gsl" --host_copt "-Werror=dangling-assignment-gsl"
58+
build --copt "-Werror=dangling-field" --host_copt "-Werror=dangling-field"
59+
build --copt "-Werror=dangling-gsl" --host_copt "-Werror=dangling-gsl"
60+
build --copt "-Werror=fortify-source" --host_copt "-Werror=fortify-source"
61+
build --copt "-Werror=return-stack-address" --host_copt "-Werror=return-stack-address"
62+
4963
# ... and disable the warnings we're not interested in.
5064
build --copt "-Wno-sign-compare" --host_copt "-Wno-sign-compare"
5165
build --copt "-Wno-unused-parameter" --host_copt "-Wno-unused-parameter"
@@ -69,7 +83,6 @@ build --copt "-Wno-cast-function-type-mismatch" --host_copt "-Wno-cast-function
6983
build --copt "-Wno-unused-but-set-variable" --host_copt "-Wno-unused-but-set-variable"
7084
build --cxxopt "-Wno-deprecated-copy" --host_cxxopt "-Wno-deprecated-copy"
7185
build --cxxopt "-Wno-deprecated-copy-with-user-provided-copy" --host_cxxopt "-Wno-deprecated-copy-with-user-provided-copy"
72-
build --cxxopt "-Wno-dangling" --host_cxxopt "-Wno-dangling"
7386

7487
# For 3rd party code: Disable warnings entirely.
7588
# They are not actionable and just create noise.

.github/workflows/github-actions-clang-tidy-bazel-post.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,40 @@ jobs:
125125
with:
126126
reviewdog_version: latest
127127

128+
- name: Dump reviewdog-visible env and event payload
129+
# Gated on debug re-runs. Reviewdog emits "this is not PullRequest
130+
# build" and posts nothing for fork PRs even though the synthesized
131+
# pull_request payload is well-formed (verified locally against
132+
# reviewdog v0.21.0). Suspect: step-level `env:` cannot override
133+
# runner-protected GITHUB_EVENT_PATH / GITHUB_EVENT_NAME, so reviewdog
134+
# reads the runner's workflow_run event payload instead of our synth.
135+
# This step proves what reviewdog actually sees on the next debug
136+
# re-run.
137+
if: runner.debug == '1'
138+
env:
139+
GITHUB_EVENT_NAME: pull_request
140+
GITHUB_EVENT_PATH: ${{ steps.event.outputs.event_path }}
141+
GITHUB_SHA: ${{ steps.meta.outputs.head_sha }}
142+
GITHUB_REPOSITORY: ${{ steps.meta.outputs.base_repo }}
143+
run: |
144+
echo "::group::GITHUB_* env visible to next step"
145+
env | grep -E '^(GITHUB_|RUNNER_|REVIEWDOG_)' | sort
146+
echo "::endgroup::"
147+
echo "::group::Synth event file location and content"
148+
echo "steps.event.outputs.event_path = ${{ steps.event.outputs.event_path }}"
149+
echo "Effective GITHUB_EVENT_PATH = ${GITHUB_EVENT_PATH}"
150+
if [ -f "${GITHUB_EVENT_PATH}" ]; then
151+
echo "--- file exists, content: ---"
152+
cat "${GITHUB_EVENT_PATH}"
153+
else
154+
echo "::warning::GITHUB_EVENT_PATH file does not exist"
155+
fi
156+
echo "::endgroup::"
157+
echo "::group::Synth file at literal path (should match above)"
158+
SYNTH="${{ steps.event.outputs.event_path }}"
159+
[ -f "${SYNTH}" ] && cat "${SYNTH}" || echo "missing"
160+
echo "::endgroup::"
161+
128162
- name: Run reviewdog
129163
env:
130164
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -133,7 +167,14 @@ jobs:
133167
GITHUB_SHA: ${{ steps.meta.outputs.head_sha }}
134168
GITHUB_REPOSITORY: ${{ steps.meta.outputs.base_repo }}
135169
run: |
170+
# On debug re-runs add reviewdog's own -log-level=debug so the
171+
# cienv detection trace is visible alongside the env dump above.
172+
LOG_FLAGS=()
173+
if [ "${RUNNER_DEBUG}" = "1" ]; then
174+
LOG_FLAGS+=(-log-level=debug)
175+
fi
136176
reviewdog \
177+
"${LOG_FLAGS[@]}" \
137178
-efm="%E%f:%l:%c: error: %m" \
138179
-efm="%W%f:%l:%c: warning: %m" \
139180
-name="clang-tidy" \

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ build:
1515
- libasound2
1616
- graphviz
1717
tools:
18-
python: "3.7"
18+
python: "3.10"
1919
nodejs: "16"
2020
jobs:
2121
post_install:

BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ OPENROAD_MAIN_DEPS = [
187187
"//src/utl",
188188
"//src/web",
189189
"@abseil-cpp//absl/base:no_destructor",
190+
"@boost.dll",
190191
"@boost.stacktrace",
191192
"@rules_cc//cc/runfiles", # sets BAZEL_CURRENT_REPOSITORY
192193
"@tcl_lang//:tcl",

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
7474

7575
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
7676

77+
set_property(DIRECTORY PROPERTY TEST_DISCOVERY_TIMEOUT 60)
78+
7779
# Get version string in OPENROAD_VERSION
7880
if(NOT OPENROAD_VERSION)
7981
include(GetGitRevisionDescription)

MODULE.bazel

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,20 @@ module(
77

88
# --- Regular dependencies (propagated to downstream consumers via MVS) ---
99

10-
bazel_dep(name = "abc", version = "0.64-yosyshq.bcr.1")
10+
bazel_dep(name = "abc", version = "0.64-yosyshq.bcr.2")
11+
12+
# Patch abc's non-readline prompt path to flush stdout and exit on EOF.
13+
# Without this, yosys's coprocess driver (which waits for the "abc NN> "
14+
# prompt over a pipe) deadlocks when abc is built with use_readline=false.
15+
# Drop this override once the fix is in a published BCR abc release.
16+
single_version_override(
17+
module_name = "abc",
18+
patch_strip = 1,
19+
patches = [
20+
"//bazel/abc-patches:0001-mainUtils-flush-prompt-and-handle-eof-without-readline.patch",
21+
],
22+
)
23+
1124
bazel_dep(name = "abseil-cpp", version = "20260107.1")
1225
bazel_dep(name = "bazel_skylib", version = "1.7.1")
1326
bazel_dep(name = "coin-or-lemon", version = "1.3.1")
@@ -30,6 +43,7 @@ bazel_dep(name = "boost.bind", version = BOOST_VERSION)
3043
bazel_dep(name = "boost.config", version = BOOST_VERSION)
3144
bazel_dep(name = "boost.container", version = BOOST_VERSION)
3245
bazel_dep(name = "boost.container_hash", version = BOOST_VERSION)
46+
bazel_dep(name = "boost.dll", version = BOOST_VERSION)
3347
bazel_dep(name = "boost.format", version = BOOST_VERSION)
3448
bazel_dep(name = "boost.fusion", version = BOOST_VERSION)
3549
bazel_dep(name = "boost.geometry", version = BOOST_VERSION)

MODULE.bazel.lock

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ RUN install -m 0755 -d /etc/apt/keyrings \
1919

2020
RUN apt-get -y update \
2121
&& apt-get -y install --no-install-recommends \
22+
bsdextrautils \
2223
build-essential \
2324
clang \
2425
containerd.io \
2526
docker-buildx-plugin \
2627
docker-ce \
2728
docker-ce-cli \
29+
groff \
2830
openjdk-21-jre-headless \
31+
pandoc \
2932
python3 \
3033
python3-yaml \
3134
time
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Matt Liberty <mliberty@precisioninno.com>
3+
Date: Fri, 30 May 2026 00:00:00 +0000
4+
Subject: [PATCH] mainUtils: match readline behavior when ABC_USE_READLINE is
5+
undefined
6+
7+
The non-readline branch of Abc_UtilsGetUsersInput has three behavioral
8+
gaps versus the readline branch that break callers driving abc as a
9+
coprocess over a pipe (e.g. yosys's techmap/abc.cc, which waits for the
10+
"abc NN> " prompt with the source command echoed back via
11+
read_until_abc_done()):
12+
13+
1. The prompt is written with fprintf() but never flushed. With stdout
14+
fully buffered (pipe), the prompt never reaches the reader; the
15+
reader waits for the prompt, abc waits in fgets(), deadlock.
16+
17+
2. There is no echo of the line read from stdin. readline() displays
18+
each character as it is typed (and on a pipe, readline's stream
19+
handling still emits the line + newline to its output). Without
20+
that, yosys never sees the "abc NN> source ..." pattern it requires
21+
to advance state.
22+
23+
3. EOF on stdin is silently ignored: fgets() returns NULL, the
24+
function returns a stale Prompt buffer, and the caller loops. The
25+
readline branch exits(0) when readline() returns NULL.
26+
27+
Fix all three. Echo only when stdin is not a tty -- on a tty the kernel
28+
already echoes typed characters, and double-echo would be visible.
29+
30+
Upstreaming to YosysHQ/abc and berkeley-abc/abc.
31+
32+
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
33+
---
34+
src/base/main/mainUtils.c | 9 ++++++++-
35+
1 file changed, 8 insertions(+), 1 deletion(-)
36+
37+
diff --git a/src/base/main/mainUtils.c b/src/base/main/mainUtils.c
38+
--- a/src/base/main/mainUtils.c
39+
+++ b/src/base/main/mainUtils.c
40+
@@ -18,6 +18,8 @@
41+
42+
***********************************************************************/
43+
44+
+#include <unistd.h>
45+
+
46+
#include "base/abc/abc.h"
47+
#include "mainInt.h"
48+
49+
@@ -91,7 +93,13 @@
50+
{
51+
char * pRetValue;
52+
fprintf( pAbc->Out, "%s", Prompt );
53+
+ fflush( pAbc->Out );
54+
pRetValue = fgets( Prompt, 5000, stdin );
55+
+ if ( pRetValue == NULL ) { exit(0); }
56+
+ if ( !isatty( fileno(stdin) ) ) {
57+
+ fputs( Prompt, pAbc->Out );
58+
+ fflush( pAbc->Out );
59+
+ }
60+
return Prompt;
61+
}
62+
#endif

bazel/abc-patches/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exports_files(glob(["*.patch"]))

0 commit comments

Comments
 (0)