Skip to content

Commit 1894c74

Browse files
Differential Revision: https://reviews.llvm.org/D151346
1 parent db54627 commit 1894c74

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Description:
66
# The MLIR "Multi-Level Intermediate Representation" Compiler Infrastructure
77

8+
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
89
load("@bazel_skylib//rules:write_file.bzl", "write_file")
910
load(":tblgen.bzl", "gentbl_cc_library", "td_library")
1011
load(":linalggen.bzl", "genlinalg")
@@ -28,6 +29,23 @@ exports_files([
2829
"utils/textmate/mlir.json",
2930
])
3031

32+
expand_template(
33+
name = "mlir_config_h_gen",
34+
out = "include/mlir/Config/mlir-config.h",
35+
substitutions = {
36+
"#cmakedefine01 MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS": "#define MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS 1"
37+
},
38+
template = "include/mlir/Config/mlir-config.h.cmake",
39+
visibility = ["//visibility:private"],
40+
)
41+
42+
cc_library(
43+
name = "config",
44+
hdrs = [
45+
"include/mlir/Config/mlir-config.h",
46+
],
47+
)
48+
3149
filegroup(
3250
name = "c_headers",
3351
srcs = glob(["include/mlir-c/**/*"]), # <== i.e. match the entire tree
@@ -5992,6 +6010,7 @@ cc_library(
59926010
),
59936011
includes = ["include"],
59946012
deps = [
6013+
":config",
59956014
":ControlFlowInterfaces",
59966015
":IR",
59976016
":LoopLikeInterface",

0 commit comments

Comments
 (0)