[bazel] Fold "${Target}Analysis" targets into their respective CodeGen targets. (#134312)

After 3801bf6164f570a145e3ebd20cf9114782ae0329, SPIRVAnalysis needs to
include SPIRV.h provided by SPIRVCodegen, but the CodeGen target already
depends on Analysis, so that would cause a circular dependency.

Analysis is a subdirectory of CodeGen so it makes sense as a part of the
main CodeGen target too.
This commit is contained in:
Jorge Gorbe Moya 2025-04-03 15:21:26 -07:00 committed by GitHub
parent 506630d6db
commit 109566a3d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3371,6 +3371,8 @@ gentbl_cc_library(
name = target["name"] + "CodeGen",
srcs = glob(
[
"lib/Target/" + target["name"] + "/Analysis/*.cpp",
"lib/Target/" + target["name"] + "/Analysis/*.h",
"lib/Target/" + target["name"] + "/GISel/*.cpp",
"lib/Target/" + target["name"] + "/GISel/*.h",
"lib/Target/" + target["name"] + "/*.cpp",
@ -3406,7 +3408,6 @@ gentbl_cc_library(
":TransformUtils",
":Vectorize",
":config",
":" + target["name"] + "Analysis",
":" + target["name"] + "CommonTableGen",
":" + target["name"] + "Info",
":" + target["name"] + "UtilsAndDesc",
@ -3511,24 +3512,6 @@ gentbl_cc_library(
":" + target["name"] + "UtilsAndDesc",
],
)],
[cc_library(
name = target["name"] + "Analysis",
srcs = glob(
[
"lib/Target/" + target["name"] + "/Analysis/*.cpp",
"lib/Target/" + target["name"] + "/Analysis/*.h",
],
allow_empty = True,
),
copts = llvm_copts,
features = ["-layering_check"],
deps = [
":Analysis",
":Core",
":Support",
":TransformUtils",
],
)],
] for target in llvm_target_lib_list]
cc_library(