From fe8f0a4cf9f49dfca982620b98220f7ad883fb21 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 7 Nov 2019 02:26:50 -0800 Subject: [PATCH] Add //cc:srcs filegroup that Bazel can depend on in unittests RELNOTES: None. PiperOrigin-RevId: 279041716 Change-Id: I90ce28031a4f2ac737cffbe57d42030c0d1d862b --- cc/BUILD | 12 ++++++++++++ cc/private/rules_impl/BUILD | 11 ++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cc/BUILD b/cc/BUILD index 06b253f..9bf862a 100644 --- a/cc/BUILD +++ b/cc/BUILD @@ -45,6 +45,18 @@ filegroup( visibility = ["//visibility:public"], ) +filegroup( + name = "srcs", + srcs = glob([ + "**/*.bzl", + "**/BUILD", + ]) + [ + "//cc/private/rules_impl:srcs", + "//cc/private/toolchain:srcs", + ], + visibility = ["//visibility:public"], +) + # TODO(aiuto): Find a way to strip this rule from the distribution tarball. filegroup( name = "distribution", diff --git a/cc/private/rules_impl/BUILD b/cc/private/rules_impl/BUILD index 54eef46..37f326d 100644 --- a/cc/private/rules_impl/BUILD +++ b/cc/private/rules_impl/BUILD @@ -4,11 +4,8 @@ licenses(["notice"]) # Apache 2.0 filegroup( name = "srcs", - srcs = glob( - ["**"], - exclude = [ - ".*", - "*~", - ], - ), + srcs = glob([ + "**/*.bzl", + "**/BUILD", + ]), )