Skip to content

Commit 346efc9

Browse files
author
osamahammad21
committed
Merge remote-tracking branch 'origin/master' into drt-warning-rules
2 parents 0b105db + 4c26918 commit 346efc9

219 files changed

Lines changed: 24185 additions & 8963 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: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
common --enable_bzlmod
2-
# sv-lang 10.0.bcr.2 (slang at f04e8156 with the foreign_cc cmake -xc++
3-
# fix) is pending upstream as a PR against bazelbuild/bazel-central-
4-
# registry: https://github.com/bazelbuild/bazel-central-registry/pull/8987
5-
# Remove this registry line once the version lands on BCR.
6-
common --registry=https://raw.githubusercontent.com/oharboe/bazel-central-registry/1beaf797951046d93a2f656d4238c954a21833e5/
7-
common --registry=https://bcr.bazel.build/
82

93
# abc is driven programmatically by OpenROAD, so skip the interactive
104
# readline dependency exposed by abc@0.64-yosyshq.bcr.2.
@@ -50,6 +44,16 @@ build --cxxopt=-fexceptions --host_cxxopt=-fexceptions
5044
build --copt "-Wall" --host_copt "-Wall"
5145
build --copt "-Wextra" --host_copt "-Wextra"
5246

47+
# Treat specific warnings as errors
48+
build --copt "-Werror=array-bounds" --host_copt "-Werror=array-bounds"
49+
build --copt "-Werror=dangling" --host_copt "-Werror=dangling"
50+
build --copt "-Werror=dangling-assignment" --host_copt "-Werror=dangling-assignment"
51+
build --copt "-Werror=dangling-assignment-gsl" --host_copt "-Werror=dangling-assignment-gsl"
52+
build --copt "-Werror=dangling-field" --host_copt "-Werror=dangling-field"
53+
build --copt "-Werror=dangling-gsl" --host_copt "-Werror=dangling-gsl"
54+
build --copt "-Werror=fortify-source" --host_copt "-Werror=fortify-source"
55+
build --copt "-Werror=return-stack-address" --host_copt "-Werror=return-stack-address"
56+
5357
# ... and disable the warnings we're not interested in.
5458
build --copt "-Wno-sign-compare" --host_copt "-Wno-sign-compare"
5559
build --copt "-Wno-unused-parameter" --host_copt "-Wno-unused-parameter"
@@ -73,7 +77,6 @@ build --copt "-Wno-cast-function-type-mismatch" --host_copt "-Wno-cast-function
7377
build --copt "-Wno-unused-but-set-variable" --host_copt "-Wno-unused-but-set-variable"
7478
build --cxxopt "-Wno-deprecated-copy" --host_cxxopt "-Wno-deprecated-copy"
7579
build --cxxopt "-Wno-deprecated-copy-with-user-provided-copy" --host_cxxopt "-Wno-deprecated-copy-with-user-provided-copy"
76-
build --cxxopt "-Wno-dangling" --host_cxxopt "-Wno-dangling"
7780

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

BUILD.bazel

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ OPENROAD_COPTS = [
143143

144144
OPENROAD_DEFINES = [
145145
"BUILD_TYPE=\\\"$(COMPILATION_MODE)\\\"",
146+
"BAZEL_BUILD",
146147
"GPU=false",
147148
"BUILD_PYTHON=false",
148149
"ABC_NAMESPACE=abc",
@@ -178,7 +179,6 @@ cc_library(
178179
# headers to consumers, so direct binary deps are what each Main.cc
179180
# include needs to see.
180181
OPENROAD_MAIN_DEPS = [
181-
":openroad_version",
182182
":ord",
183183
":tcl_readline_setup",
184184
"//bazel:tcl_library_init",
@@ -187,9 +187,7 @@ OPENROAD_MAIN_DEPS = [
187187
"//src/utl",
188188
"//src/web",
189189
"@abseil-cpp//absl/base:no_destructor",
190-
"@boost.dll",
191190
"@boost.stacktrace",
192-
"@rules_cc//cc/runfiles", # sets BAZEL_CURRENT_REPOSITORY
193191
"@tcl_lang//:tcl",
194192
]
195193

@@ -550,10 +548,14 @@ build_test(
550548
sh_test(
551549
name = "lint_tcl_test",
552550
srcs = ["//bazel:tcl_lint_test.sh"],
553-
args = ["$(rootpath //bazel:tclint)"],
551+
args = [
552+
"$(rootpath //bazel:tclint)",
553+
"$(rootpath @git)",
554+
],
554555
data = [
555556
"tclint.toml",
556557
"//bazel:tclint",
558+
"@git",
557559
],
558560
tags = ["local"],
559561
)
@@ -564,10 +566,14 @@ sh_test(
564566
sh_test(
565567
name = "fmt_tcl_test",
566568
srcs = ["//bazel:tcl_fmt_test.sh"],
567-
args = ["$(rootpath //bazel:tclfmt)"],
569+
args = [
570+
"$(rootpath //bazel:tclfmt)",
571+
"$(rootpath @git)",
572+
],
568573
data = [
569574
"tclint.toml",
570575
"//bazel:tclfmt",
576+
"@git",
571577
],
572578
tags = ["local"],
573579
)
@@ -591,10 +597,14 @@ sh_binary(
591597
sh_test(
592598
name = "lint_bzl_test",
593599
srcs = ["//bazel:bzl_lint_test.sh"],
594-
args = ["$(rootpath @buildifier_prebuilt//:buildifier)"],
600+
args = [
601+
"$(rootpath @buildifier_prebuilt//:buildifier)",
602+
"$(rootpath @git)",
603+
],
595604
data = [
596605
"MODULE.bazel",
597606
"@buildifier_prebuilt//:buildifier",
607+
"@git",
598608
],
599609
tags = ["local"],
600610
)
@@ -605,10 +615,14 @@ sh_test(
605615
sh_test(
606616
name = "fmt_bzl_test",
607617
srcs = ["//bazel:bzl_fmt_test.sh"],
608-
args = ["$(rootpath @buildifier_prebuilt//:buildifier)"],
618+
args = [
619+
"$(rootpath @buildifier_prebuilt//:buildifier)",
620+
"$(rootpath @git)",
621+
],
609622
data = [
610623
"MODULE.bazel",
611624
"@buildifier_prebuilt//:buildifier",
625+
"@git",
612626
],
613627
tags = ["local"],
614628
)

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ bazel_dep(name = "boost.bind", version = BOOST_VERSION)
4343
bazel_dep(name = "boost.config", version = BOOST_VERSION)
4444
bazel_dep(name = "boost.container", version = BOOST_VERSION)
4545
bazel_dep(name = "boost.container_hash", version = BOOST_VERSION)
46-
bazel_dep(name = "boost.dll", version = BOOST_VERSION)
4746
bazel_dep(name = "boost.format", version = BOOST_VERSION)
4847
bazel_dep(name = "boost.fusion", version = BOOST_VERSION)
4948
bazel_dep(name = "boost.geometry", version = BOOST_VERSION)
@@ -77,11 +76,12 @@ bazel_dep(name = "boost.utility", version = BOOST_VERSION)
7776
bazel_dep(name = "cudd", version = "3.0.0.bcr.2")
7877
bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
7978
bazel_dep(name = "fmt", version = "11.2.0.bcr.1")
79+
bazel_dep(name = "git", version = "2.54.0")
8080
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
8181
bazel_dep(name = "openmp", version = "21.1.5.bcr.1")
8282
bazel_dep(name = "or-tools", version = "9.15")
8383
bazel_dep(name = "spdlog", version = "1.15.1")
84-
bazel_dep(name = "sv-lang", version = "10.0.bcr.2")
84+
bazel_dep(name = "sv-lang", version = "10.0.1-20260316-f04e8156")
8585
bazel_dep(name = "tcl_lang", version = "9.0.2.bcr.1")
8686
bazel_dep(name = "tcmalloc", version = "0.0.0-20250927-12f2552")
8787
bazel_dep(name = "yaml-cpp", version = "0.9.0")

0 commit comments

Comments
 (0)