Skip to content

Commit 3c2a2fb

Browse files
qobilidopPINS Team
andauthored
Properly load rules_cc in p4-constraints. (#175)
PiperOrigin-RevId: 804452893 Signed-off-by: Bili Dong <[email protected]> Co-authored-by: PINS Team <[email protected]>
1 parent c48be3a commit 3c2a2fb

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

WORKSPACE.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
5656

5757
grpc_extra_deps()
5858

59+
# -- Load Rules CC -------------------------------------------------------------
60+
# See https://github.com/bazelbuild/rules_cc.
61+
load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies")
62+
63+
rules_cc_dependencies()
64+
5965
# -- Load Rules Foreign CC (for building Z3) -----------------------------------
6066
# Used for Z3.
6167

p4_constraints_deps.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ def p4_constraints_deps():
6464
sha256 = "e3aaefde68b839299cbc988178529535e66048398f7d083b40c69fe0da55f8b7",
6565
build_file = "@//:bazel/BUILD.z3.bazel",
6666
)
67+
if not native.existing_rule("rules_cc"):
68+
http_archive(
69+
name = "rules_cc",
70+
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.16/rules_cc-0.0.16.tar.gz"],
71+
sha256 = "bbf1ae2f83305b7053b11e4467d317a7ba3517a12cef608543c1b1c5bf48a4df",
72+
strip_prefix = "rules_cc-0.0.16",
73+
)
6774
if not native.existing_rule("rules_foreign_cc"): # Required for Z3.
6875
http_archive(
6976
name = "rules_foreign_cc",

0 commit comments

Comments
 (0)