Skip to content

Commit 5bba176

Browse files
committed
[bazel] fix layering check to run bazel with 16.x
Preparation to update bazel builder to use LLVM 16 release where layering check was enabled https://reviews.llvm.org/D132779 Current setup missed some backsliding in layering check as it has only on for projects with the check enforced. Disabled it completely for libc and fixed for DWARFLinkerParallel. It would be great to re-enable it for libc later.
1 parent 8e64821 commit 5bba176

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
1515

1616
package(
1717
default_visibility = ["//visibility:public"],
18-
features = ["-use_header_modules"],
18+
features = [
19+
"-use_header_modules",
20+
"-layering_check",
21+
],
1922
)
2023

2124
licenses(["notice"])

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ cc_library(
395395
cc_library(
396396
name = "DebugInfo",
397397
hdrs = glob(["include/llvm/DebugInfo/**/*.h"]),
398-
textual_hdrs = glob(["include/llvm/DebugInfo/**/*.def"]),
399398
copts = llvm_copts,
399+
textual_hdrs = glob(["include/llvm/DebugInfo/**/*.def"]),
400400
deps = [
401401
":Object",
402402
":Support",
@@ -420,8 +420,9 @@ cc_library(
420420
"lib/DebugInfo/BTF/*.cpp",
421421
"lib/DebugInfo/BTF/*.h",
422422
]),
423-
hdrs = glob(["include/llvm/DebugInfo/BTF/*.h"]) +
424-
["include/llvm/DebugInfo/BTF/BTF.def"],
423+
hdrs = glob(["include/llvm/DebugInfo/BTF/*.h"]) + [
424+
"include/llvm/DebugInfo/BTF/BTF.def",
425+
],
425426
copts = llvm_copts,
426427
deps = [
427428
":DebugInfo",
@@ -489,9 +490,9 @@ cc_library(
489490
deps = [
490491
":BinaryFormat",
491492
":DebugInfo",
493+
":DebugInfoBTF",
492494
":DebugInfoCodeView",
493495
":DebugInfoMSF",
494-
":DebugInfoBTF",
495496
":Object",
496497
":Support",
497498
":config",
@@ -2796,6 +2797,7 @@ cc_library(
27962797
":DebugInfoDWARF",
27972798
":MC",
27982799
":Support",
2800+
":Target",
27992801
":TargetParser",
28002802
],
28012803
)
@@ -3735,8 +3737,8 @@ cc_binary(
37353737
":AllTargetsAsmParsers",
37363738
":AllTargetsCodeGens",
37373739
":BinaryFormat",
3738-
":LibtoolDarwinOptionsTableGen",
37393740
":Core",
3741+
":LibtoolDarwinOptionsTableGen",
37403742
":Object",
37413743
":Option",
37423744
":Support",
@@ -4237,9 +4239,9 @@ cc_binary(
42374239
stamp = 0,
42384240
deps = [
42394241
":BinaryFormat",
4242+
":DebugInfoBTF",
42404243
":DebugInfoCodeView",
42414244
":DebugInfoMSF",
4242-
":DebugInfoBTF",
42434245
":DebugInfoPDB",
42444246
":Object",
42454247
":ObjectYAML",

0 commit comments

Comments
 (0)