Skip to content

[libc][bazel] Add a helper library with all deps of generated headers. #136582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ py_binary(
main = "utils/hdrgen/hdrgen/main.py",
)

# Library containing all headers that can be transitively included by generated llvm-libc
# public headers (or by the unit tests).
libc_support_library(
name = "public_headers_deps",
textual_hdrs = [
"include/__llvm-libc-common.h",
] + glob([
"include/llvm-libc-types/**/*.h",
"include/llvm-libc-macros/**/*.h",
]),
)

################################## Base Config #################################

libc_support_library(
Expand Down Expand Up @@ -1898,11 +1910,11 @@ libc_support_library(
name = "atan_utils",
hdrs = ["src/math/generic/atan_utils.h"],
deps = [
":__support_integer_literals",
":__support_fputil_double_double",
":__support_fputil_dyadic_float",
":__support_fputil_multiply_add",
":__support_fputil_polyeval",
":__support_integer_literals",
":__support_macros_optimization",
],
)
Expand Down
20 changes: 20 additions & 0 deletions utils/bazel/llvm-project-overlay/libc/test/include/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Tests for LLVM libc public headers.

load("//libc/test:libc_test_rules.bzl", "libc_test")

licenses(["notice"])

libc_test(
name = "stdbit_test",
srcs = [
"stdbit_stub.h",
"stdbit_test.cpp",
],
deps = [
"//libc:public_headers_deps",
],
)
Loading