Skip to content

Commit 9817d5d

Browse files
BYVoidclaude
andcommitted
Fix Bazel build with bzlmod by loading cc_library rule
With bzlmod, native rules like cc_library are no longer implicitly available and must be explicitly loaded from rules_cc. Add the rules_cc dependency to MODULE.bazel and the corresponding load statement to BUILD.bazel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7124634 commit 9817d5d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
2+
13
cc_library(
24
name = "fast_float",
35
hdrs = glob(["include/fast_float/*.h"]),

MODULE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ module(
77
)
88

99
bazel_dep(name = "doctest", version = "2.4.11", dev_dependency = True)
10+
11+
bazel_dep(name = "rules_cc", version = "0.2.17")

0 commit comments

Comments
 (0)