Skip to content

Commit

Permalink
[bazel] Move MC header usage from Support to tblgen
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rnk committed Oct 14, 2021
1 parent 8c66d78 commit aeeefe9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Expand Up @@ -187,7 +187,6 @@ cc_library(
hdrs = glob([
"include/llvm/Support/**/*.h",
"include/llvm/ADT/*.h",
"include/llvm/MC/*.h", # TODO(maskray): Fix the layering issue.
]) + [
"include/llvm-c/Core.h",
"include/llvm-c/DataTypes.h",
Expand Down Expand Up @@ -453,6 +452,11 @@ cc_library(
"utils/TableGen/*.cpp",
"utils/TableGen/GlobalISel/*.cpp",

# Some tablegen sources include headers from MC, so these have to be
# listed here. MC uses headers produced by tablegen, so it cannot be a
# regular dependency.
"include/llvm/MC/*.h",

# We have to include these headers here as well as in the `hdrs` below
# to allow the `.cpp` files to use file-relative-inclusion to find
# them, even though consumers of this library use inclusion relative to
Expand Down

0 comments on commit aeeefe9

Please sign in to comment.