Skip to content

Commit fdb5726

Browse files
authored
Fix bazel build after #144594 (#144904)
1 parent 3516ad0 commit fdb5726

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

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

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ cc_library(
418418
"include/llvm/BinaryFormat/ELFRelocs/*.def",
419419
]),
420420
deps = [
421+
":PPCTargetParser",
421422
":Support",
422423
":TargetParser",
423424
],
@@ -1364,6 +1365,13 @@ td_library(
13641365
]),
13651366
)
13661367

1368+
td_library(
1369+
name = "PPCTargetTdFiles",
1370+
srcs = glob([
1371+
"lib/Target/PowerPC/**/*.td",
1372+
]),
1373+
)
1374+
13671375
gentbl_cc_library(
13681376
name = "RISCVTargetParserDefGen",
13691377
tbl_outs = {"include/llvm/TargetParser/RISCVTargetParserDef.inc": ["-gen-riscv-target-def"]},
@@ -1375,11 +1383,38 @@ gentbl_cc_library(
13751383
],
13761384
)
13771385

1386+
gentbl_cc_library(
1387+
name = "PPCGenTargetFeaturesGen",
1388+
tbl_outs = {"include/llvm/TargetParser/PPCGenTargetFeatures.inc": ["-gen-target-features"]},
1389+
tblgen = ":llvm-tblgen",
1390+
td_file = "lib/Target/PowerPC/PPC.td",
1391+
deps = [
1392+
":CommonTargetTdFiles",
1393+
":PPCTargetTdFiles",
1394+
],
1395+
)
1396+
1397+
cc_library(
1398+
name = "PPCTargetParser",
1399+
srcs = ["lib/TargetParser/PPCTargetParser.cpp"],
1400+
hdrs = ["include/llvm/TargetParser/PPCTargetParser.h"],
1401+
copts = llvm_copts,
1402+
includes = ["include"],
1403+
deps = [
1404+
":PPCGenTargetFeaturesGen",
1405+
":Support",
1406+
":TargetParser",
1407+
],
1408+
)
1409+
13781410
cc_library(
13791411
name = "TargetParser",
1380-
srcs = glob([
1381-
"lib/TargetParser/*.cpp",
1382-
]) + select({
1412+
srcs = glob(
1413+
[
1414+
"lib/TargetParser/*.cpp",
1415+
],
1416+
exclude = ["lib/TargetParser/PPCTargetParser.cpp"],
1417+
) + select({
13831418
"@platforms//os:windows": glob([
13841419
"lib/TargetParser/Windows/*.inc",
13851420
]),

0 commit comments

Comments
 (0)