diff options
author | Jingwen Chen <jingwen@google.com> | 2021-04-27 05:54:20 +0000 |
---|---|---|
committer | Jingwen Chen <jingwen@google.com> | 2021-04-27 06:26:40 +0000 |
commit | 882bcc1c1cf4af1c3712c7d9c4fea315a8a8d08d (patch) | |
tree | d329e5a283a614a188fea9b6e7e1feb7574ef946 /bazel | |
parent | c30d7beb8f4d479f8141130287279f17f53abd23 (diff) | |
download | soong-882bcc1c1cf4af1c3712c7d9c4fea315a8a8d08d.tar.gz |
bp2build: remove header globs in generated srcs.
Not needed anymore for bp2build-incremental since https://android-review.googlesource.com/q/topic:no-include-check.
Not needed for mixed builds either, since cc compile actions aren't sandboxed.
Fixes: 186488830
Test: treehugger and go tests
Change-Id: Ib5d4908dcce6bf910a653c457bb251d726e717d4
Diffstat (limited to 'bazel')
-rw-r--r-- | bazel/properties.go | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/bazel/properties.go b/bazel/properties.go index 48d958972..a03b0270f 100644 --- a/bazel/properties.go +++ b/bazel/properties.go @@ -64,43 +64,6 @@ type LabelList struct { Excludes []Label } -// GlobsInDir returns a list of glob expressions for a list of extensions -// (optionally recursive) within a directory. -func GlobsInDir(dir string, recursive bool, extensions []string) []string { - globs := []string{} - - globInfix := "" - if dir == "." { - if recursive { - // e.g "**/*.h" - globInfix = "**/" - } // else e.g. "*.h" - for _, ext := range extensions { - globs = append(globs, globInfix+"*"+ext) - } - } else { - if recursive { - // e.g. "foo/bar/**/*.h" - dir += "/**" - } // else e.g. "foo/bar/*.h" - for _, ext := range extensions { - globs = append(globs, dir+"/*"+ext) - } - } - return globs -} - -// LooseHdrsGlobs returns the list of non-recursive header globs for each parent directory of -// each source file in this LabelList's Includes. -func (ll *LabelList) LooseHdrsGlobs(exts []string) []string { - var globs []string - for _, parentDir := range ll.uniqueParentDirectories() { - globs = append(globs, - GlobsInDir(parentDir, false, exts)...) - } - return globs -} - // uniqueParentDirectories returns a list of the unique parent directories for // all files in ll.Includes. func (ll *LabelList) uniqueParentDirectories() []string { |