Skip to content

Commit

Permalink
Added incompatibility flag to prepare for flip in future Bazel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
abrisco committed Aug 6, 2024
1 parent 14d8a36 commit 061bca2
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ test:ciremotebuild --tls_client_key=/root/.ssh/buildbuddy-key.pem
test:ciremotebuild --build_metadata=VISIBILITY=PUBLIC
test:ciremotebuild --remote_timeout=3600

###############################################################################
## Incompatibility flags
###############################################################################

# https://github.com/bazelbuild/bazel/issues/8195
build --incompatible_disallow_empty_glob=true

###############################################################################
## User flags
###############################################################################
Expand Down
1 change: 0 additions & 1 deletion dependency_support/at_clifford_yosys/bundled.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ cc_library(
"backends/**/*.h",
"frontends/**/*.h",
"passes/**/*.h",
"techlibs/**/*.h",
],
exclude = [
"backends/protobuf/*.h",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ cc_library(
"ncurses/tinfo/*.c",
"ncurses/trace/*.c",
"ncurses/tty/*.c",
"build_sources/*.c",
],
exclude = glob([
"ncurses/base/lib_driver.c",
Expand All @@ -127,8 +126,6 @@ cc_library(
"ncurses/tinfo/tinfo_driver.c",
"ncurses/tinfo/make_hash.c",
"ncurses/report_offsets.c",
"ncurses/*_test.c",
"build_sources/*_test.c",
]),
) + [
# Generated files are not found by glob.
Expand Down
13 changes: 13 additions & 0 deletions dependency_support/org_gnu_bison/bison_empty_glob.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/bison/internal/gnulib/gnulib.BUILD b/bison/internal/gnulib/gnulib.BUILD
index 9ee0b51..84fcf5e 100644
--- a/bison/internal/gnulib/gnulib.BUILD
+++ b/bison/internal/gnulib/gnulib.BUILD
@@ -118,7 +118,7 @@ _GNULIB_SRCS = glob([
"lib/xmalloc.c",
"lib/xmemdup0.c",
"lib/xstrndup.c",
-])
+], allow_empty = True)

_GNULIB_DARWIN_SRCS = []

5 changes: 5 additions & 0 deletions dependency_support/org_gnu_bison/org_gnu_bison.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ def org_gnu_bison():
name = "rules_bison",
sha256 = "2279183430e438b2dc77cacd7b1dbb63438971b2411406570f1ddd920b7c9145",
urls = ["https://github.com/jmillikin/rules_bison/releases/download/v0.2.2/rules_bison-v0.2.2.tar.xz"],
patch_args = ["-p1"],
patches = [
# TODO(https://github.com/jmillikin/rules_bison/pull/14): Delete after this PR is merged
Label("//dependency_support/org_gnu_bison:bison_empty_glob.patch"),
],
)
2 changes: 2 additions & 0 deletions dependency_support/org_theopenroadproject/bundled.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ cc_library(
"src/gui/src/stub_heatMap.cpp",
],
exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE,
allow_empty = True,
) + [
"src/stt/src/flt/etc/POST9.cpp",
"src/stt/src/flt/etc/POWV9.cpp",
Expand Down Expand Up @@ -122,6 +123,7 @@ cc_library(
"src/gui/src/stub_heatMap.cpp",
],
exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE,
allow_empty = True,
) + [
"src/stt/src/flt/etc/POST9.cpp",
"src/stt/src/flt/etc/POWV9.cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def org_theopenroadproject():
new_git_repository,
name = "org_theopenroadproject",
commit = "f6da0454e350e93c62264f7b7c95029e1ad2b9fd",
# TODO: Convert to http_archive whenever there is an archive
# which contains submodules.
# https://github.com/dear-github/dear-github/issues/214
init_submodules = True,
remote = "https://github.com/The-OpenROAD-Project/OpenROAD.git",
build_file = Label("@rules_hdl//dependency_support/org_theopenroadproject:bundled.BUILD.bazel"),
Expand Down

0 comments on commit 061bca2

Please sign in to comment.