[llvm] Add a filegroup containing _all_ sources to the libc build rules (PR #169155)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 22 01:39:00 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Chandler Carruth (chandlerc)
<details>
<summary>Changes</summary>
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.
That said, if there is a better way to do this or a different design, let me know. Not super familiar with the Bazel logic for llvm-libc.
---
Full diff: https://github.com/llvm/llvm-project/pull/169155.diff
1 Files Affected:
- (modified) utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl (+6)
``````````diff
diff --git a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
index 0f2965369c296..c871334dd95b3 100644
--- a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
@@ -247,6 +247,12 @@ def libc_header_library(name, hdrs, deps = [], **kwargs):
**kwargs
)
+ _libc_srcs_filegroup(
+ name = name + "_hdrs",
+ libs = [":" + name],
+ enforce_headers_only = True,
+ )
+
def libc_generated_header(name, hdr, yaml_template, other_srcs = []):
"""Generates a libc header file from YAML template.
``````````
</details>
https://github.com/llvm/llvm-project/pull/169155
More information about the llvm-commits
mailing list