Skip to content

Revert "[libc][bazel] Support generating public libc headers in Bazel… #143001

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
Jun 5, 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
9 changes: 0 additions & 9 deletions utils/bazel/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,6 @@ maybe(
url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.4.0.tar.gz",
)

maybe(
http_archive,
name = "pyyaml",
build_file = "@llvm-raw//utils/bazel/third_party_build:pyyaml.BUILD",
sha256 = "f0a35d7f282a6d6b1a4f3f3965ef5c124e30ed27a0088efb97c0977268fd671f",
strip_prefix = "pyyaml-5.1/lib3",
url = "https://github.com/yaml/pyyaml/archive/refs/tags/5.1.zip",
)

load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

py_repositories()
Expand Down
9 changes: 0 additions & 9 deletions utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ load("@rules_python//python:defs.bzl", "py_binary")
load(
":libc_build_rules.bzl",
"libc_function",
"libc_generated_header",
"libc_header_library",
"libc_math_function",
"libc_support_library",
Expand Down Expand Up @@ -89,14 +88,6 @@ py_binary(
srcs = glob(["utils/hdrgen/hdrgen/**/*.py"]),
imports = ["utils/hdrgen"],
main = "utils/hdrgen/hdrgen/main.py",
deps = ["@pyyaml//:yaml"],
)

libc_generated_header(
name = "include_stdbit_h",
hdr = "include/stdbit.h",
other_srcs = ["include/stdbit.h.def"],
yaml_template = "include/stdbit.yaml",
)

# Library containing all headers that can be transitively included by generated llvm-libc
Expand Down
23 changes: 0 additions & 23 deletions utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -248,29 +248,6 @@ def libc_header_library(name, hdrs, deps = [], **kwargs):
**kwargs
)

def libc_generated_header(name, hdr, yaml_template, other_srcs = []):
"""Generates a libc header file from YAML template.

Args:
name: Name of the genrule target.
hdr: Path of the header file to generate.
yaml_template: Path of the YAML template file.
other_srcs: Other files required to generate the header, if any.
"""
hdrgen = "//libc:hdrgen"
cmd = "$(location {hdrgen}) $(location {yaml}) -o $@".format(
hdrgen = hdrgen,
yaml = yaml_template,
)

native.genrule(
name = name,
outs = [hdr],
srcs = [yaml_template] + other_srcs,
cmd = cmd,
tools = [hdrgen],
)

def libc_math_function(
name,
additional_deps = None):
Expand Down
16 changes: 0 additions & 16 deletions utils/bazel/third_party_build/pyyaml.BUILD

This file was deleted.

Loading