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

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 12:16:57 PDT 2024


================
@@ -5338,3 +5339,9 @@ cc_binary(
         ":Support",
     ],
 )
+
+td_library(
----------------
rupprecht wrote:

nit: do you think earlier, somewhere before the first use of OptParser.td, would make more sense? e.g. before the rule here: https://github.com/llvm/llvm-project/blob/4e6745cc4db309c0e1b5e41d4598f67763f4c096/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel#L2695

Rules are often ordered so that rules don't depend on other rules later in the build file. Having it at the end doesn't violate that at the moment, since this is just exporting it for other users, but I imagine we might want to update all the `gentbl` users in this file to use `deps = [":OptParserTdFiles"]` instead of `td_srcs = ["include/llvm/Option/OptParser.td"]`

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


More information about the llvm-commits mailing list