[PATCH] D151346: Fix bazel build for https://reviews.llvm.org/D144552
Sterling Augustine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 09:40:32 PDT 2023
saugustine created this revision.
Herald added subscribers: bviyer, Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini.
Herald added a project: All.
This revision was not accepted when it landed; it landed in state "Draft".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1894c741b0ca: Fix bazel build for https://reviews.llvm.org/D144552 (authored by saugustine).
Herald added subscribers: llvm-commits, stephenneuendorffer, nicolasvasilache.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151346
Files:
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Index: utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
===================================================================
--- utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -5,6 +5,7 @@
# Description:
# The MLIR "Multi-Level Intermediate Representation" Compiler Infrastructure
+load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load(":tblgen.bzl", "gentbl_cc_library", "td_library")
load(":linalggen.bzl", "genlinalg")
@@ -28,6 +29,23 @@
"utils/textmate/mlir.json",
])
+expand_template(
+ name = "mlir_config_h_gen",
+ out = "include/mlir/Config/mlir-config.h",
+ substitutions = {
+ "#cmakedefine01 MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS": "#define MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS 1"
+ },
+ template = "include/mlir/Config/mlir-config.h.cmake",
+ visibility = ["//visibility:private"],
+)
+
+cc_library(
+ name = "config",
+ hdrs = [
+ "include/mlir/Config/mlir-config.h",
+ ],
+)
+
filegroup(
name = "c_headers",
srcs = glob(["include/mlir-c/**/*"]), # <== i.e. match the entire tree
@@ -5992,6 +6010,7 @@
),
includes = ["include"],
deps = [
+ ":config",
":ControlFlowInterfaces",
":IR",
":LoopLikeInterface",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151346.525229.patch
Type: text/x-patch
Size: 1386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230524/08eee4fc/attachment.bin>
More information about the llvm-commits
mailing list