Skip to content

Commit 77d6dd4

Browse files
authored
Add a filegroup containing _all_ sources to the libc build rules (llvm#169155)
These rules already expose a filegroup containing the _dependencies_, but that misses the source files directly in the top level library. Without this filegroup, there isn't a way to access the source files used by libcxx when building it, etc.
1 parent 13829df commit 77d6dd4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ def libc_header_library(name, hdrs, deps = [], **kwargs):
247247
**kwargs
248248
)
249249

250+
# Also generate a filegroup that contains _all_ of the headers for use in
251+
# systems like Carbon's where runtime sources are shipped outside of Bazel.
252+
_libc_srcs_filegroup(
253+
name = name + "_hdrs",
254+
libs = [":" + name],
255+
enforce_headers_only = True,
256+
)
257+
250258
def libc_generated_header(name, hdr, yaml_template, other_srcs = []):
251259
"""Generates a libc header file from YAML template.
252260

0 commit comments

Comments
 (0)