Skip to content

Commit aeeefe9

Browse files
committed
[bazel] Move MC header usage from Support to tblgen
After the TargetRegistry.h move, nothing in Support includes headers from MC. However, files in tablegen use MC headers, so we must add an entry for them in tblgen srcs. Differential Revision: https://reviews.llvm.org/D111835
1 parent 8c66d78 commit aeeefe9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ cc_library(
187187
hdrs = glob([
188188
"include/llvm/Support/**/*.h",
189189
"include/llvm/ADT/*.h",
190-
"include/llvm/MC/*.h", # TODO(maskray): Fix the layering issue.
191190
]) + [
192191
"include/llvm-c/Core.h",
193192
"include/llvm-c/DataTypes.h",
@@ -453,6 +452,11 @@ cc_library(
453452
"utils/TableGen/*.cpp",
454453
"utils/TableGen/GlobalISel/*.cpp",
455454

455+
# Some tablegen sources include headers from MC, so these have to be
456+
# listed here. MC uses headers produced by tablegen, so it cannot be a
457+
# regular dependency.
458+
"include/llvm/MC/*.h",
459+
456460
# We have to include these headers here as well as in the `hdrs` below
457461
# to allow the `.cpp` files to use file-relative-inclusion to find
458462
# them, even though consumers of this library use inclusion relative to

0 commit comments

Comments
 (0)