[llvm] [libc][bazel] Add py_binary rule to build hdrgen. (PR #129161)
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 16:30:23 PST 2025
https://github.com/vonosmas created https://github.com/llvm/llvm-project/pull/129161
None
>From 5d9e4083f1e37cea915c7047ebb8bb01ddde1b25 Mon Sep 17 00:00:00 2001
From: Alexey Samsonov <vonosmas at gmail.com>
Date: Thu, 27 Feb 2025 16:27:57 -0800
Subject: [PATCH] [libc][bazel] Add py_binary rule to build hdrgen.
---
utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 9 +++++++++
1 file changed, 9 insertions(+)
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(
More information about the llvm-commits
mailing list