Skip to content

[libc][bazel] Add py_binary rule to build hdrgen. #129161

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
Feb 28, 2025

Conversation

vonosmas
Copy link
Contributor

No description provided.

@llvmbot llvmbot added libc bazel "Peripheral" support tier build system: utils/bazel labels Feb 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 28, 2025

@llvm/pr-subscribers-libc

Author: Alexey Samsonov (vonosmas)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/129161.diff

1 Files Affected:

  • (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (+9)
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index b45145acc2cfe..cc0c7c65b736b 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -5,6 +5,7 @@
 # LLVM libc project.
 load("@bazel_skylib//lib:selects.bzl", "selects")
 load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
+load("@rules_python//python:defs.bzl", "py_binary")
 load(
     ":libc_build_rules.bzl",
     "libc_function",
@@ -51,6 +52,14 @@ config_setting(
     flag_values = {":mpfr": "system"},
 )
 
+########################### Header Generation ##################################
+
+py_binary(
+    name = "hdrgen",
+    srcs = glob(["utils/hdrgen/hdrgen/**/*.py"]),
+    imports = ["utils/hdrgen"],
+)
+
 ################################## Base Config #################################
 
 libc_support_library(

Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vonosmas vonosmas merged commit bafd44b into llvm:main Feb 28, 2025
12 checks passed
@vonosmas vonosmas deleted the hdrgen-bazel branch February 28, 2025 04:07
cheezeburglar pushed a commit to cheezeburglar/llvm-project that referenced this pull request Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel libc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants