Fix support for --incompatible_disallow_empty_glob (#331)

This allows downstream repos to set this flag
This commit is contained in:
Keith Smiley 2024-06-24 14:37:06 -07:00 committed by GitHub
parent d8474a173c
commit 1d685a99db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 9 deletions

View File

@ -1 +1,2 @@
common --incompatible_disallow_empty_glob
build --features=layering_check

View File

@ -842,7 +842,7 @@ cc_library(
"crypto/**/*.h",
"crypto/include/*.h",
"include/internal/*.h",
]),
], allow_empty = True),
hdrs = HDRS + [
# These are not independent compile units, but are included in other .c files.
"crypto/LPdir_unix.c",

View File

@ -15,11 +15,14 @@
package(default_visibility = ["//visibility:public"])
# Some targets may need to directly depend on these files.
exports_files(glob([
"bin/*",
"lib/*",
"include/*",
]))
exports_files(glob(
[
"bin/*",
"lib/*",
"include/*",
],
allow_empty = True,
))
## LLVM toolchain files
@ -34,7 +37,10 @@ filegroup(
filegroup(
name = "ld",
srcs = glob(["bin/ld.lld", "bin/ld64.lld"]),
srcs = [
"bin/ld.lld",
"bin/ld64.lld",
],
)
filegroup(
@ -46,8 +52,11 @@ filegroup(
)
filegroup(
name = "all_includes",
srcs = glob(["include/**"]),
name = "all_includes",
srcs = glob(
["include/**"],
allow_empty = True,
),
)
filegroup(
@ -65,6 +74,7 @@ filegroup(
# clang_rt.*.o supply crtbegin and crtend sections.
"lib/**/clang_rt.*.o",
],
allow_empty = True,
exclude = [
"lib/libLLVM*.a",
"lib/libclang*.a",