Skip to content

Commit 109566a

Browse files
authored
[bazel] Fold "${Target}Analysis" targets into their respective CodeGen targets. (llvm#134312)
After 3801bf6, 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.
1 parent 506630d commit 109566a

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

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

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,6 +3371,8 @@ gentbl_cc_library(
33713371
name = target["name"] + "CodeGen",
33723372
srcs = glob(
33733373
[
3374+
"lib/Target/" + target["name"] + "/Analysis/*.cpp",
3375+
"lib/Target/" + target["name"] + "/Analysis/*.h",
33743376
"lib/Target/" + target["name"] + "/GISel/*.cpp",
33753377
"lib/Target/" + target["name"] + "/GISel/*.h",
33763378
"lib/Target/" + target["name"] + "/*.cpp",
@@ -3406,7 +3408,6 @@ gentbl_cc_library(
34063408
":TransformUtils",
34073409
":Vectorize",
34083410
":config",
3409-
":" + target["name"] + "Analysis",
34103411
":" + target["name"] + "CommonTableGen",
34113412
":" + target["name"] + "Info",
34123413
":" + target["name"] + "UtilsAndDesc",
@@ -3511,24 +3512,6 @@ gentbl_cc_library(
35113512
":" + target["name"] + "UtilsAndDesc",
35123513
],
35133514
)],
3514-
[cc_library(
3515-
name = target["name"] + "Analysis",
3516-
srcs = glob(
3517-
[
3518-
"lib/Target/" + target["name"] + "/Analysis/*.cpp",
3519-
"lib/Target/" + target["name"] + "/Analysis/*.h",
3520-
],
3521-
allow_empty = True,
3522-
),
3523-
copts = llvm_copts,
3524-
features = ["-layering_check"],
3525-
deps = [
3526-
":Analysis",
3527-
":Core",
3528-
":Support",
3529-
":TransformUtils",
3530-
],
3531-
)],
35323515
] for target in llvm_target_lib_list]
35333516

35343517
cc_library(

0 commit comments

Comments
 (0)