[llvm] [bazel] Add td_library target for OptParser.td (PR #86363)

Keith Smiley via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 16:59:25 PDT 2024


https://github.com/keith created https://github.com/llvm/llvm-project/pull/86363

This allows downstream consumers to depend on this file. Without this target the include paths to this are mangled by bazel.

>From e800475cd4c713e6e61064a67a9bcc8eab5602dd Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Fri, 22 Mar 2024 16:58:29 -0700
Subject: [PATCH] [bazel] Add td_library target for OptParser.td

This allows downstream consumers to depend on this file. Without this
target the include paths to this are mangled by bazel.
---
 utils/bazel/llvm-project-overlay/llvm/BUILD.bazel | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index f5a2d264b69052..a61606c11a0f7f 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -4,6 +4,7 @@
 
 load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
 load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("//mlir:tblgen.bzl", "td_library")
 load(":binary_alias.bzl", "binary_alias")
 load(":config.bzl", "llvm_config_defines")
 load(":enum_targets_gen.bzl", "enum_targets_gen")
@@ -5338,3 +5339,9 @@ cc_binary(
         ":Support",
     ],
 )
+
+td_library(
+    name = "OptParserTdFiles",
+    srcs = ["include/llvm/Option/OptParser.td"],
+    includes = ["include"],
+)



More information about the llvm-commits mailing list