Do not glob headers in out/
Currently, it skips it for files in out/soong/. This was a valid
assumption since all intermediate artifacts in soong are placed under
out/soong, and soong modules cannot depend on make modules.
However, this might change in multitree, since the headers provided by
build orchestrator will be under out/api_surfaces (next CL in this stack). The good side effect
of this is that we do not retrigger a rebuild of soong/build.ninja if a
new API file (.h/.map.txt) is added to this directory (ctx.GlobWithDeps
adds the files to the deps of out/soong/build.ninja).
Test: TH
Change-Id: I3c3722390d04a50d793b1646df00cdf7acb12b49
diff --git a/cc/library.go b/cc/library.go
index 41a68e3..ac64f8a 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -956,7 +956,7 @@
for _, path := range paths {
dir := path.String()
// Skip if dir is for generated headers
- if strings.HasPrefix(dir, android.PathForOutput(ctx).String()) {
+ if strings.HasPrefix(dir, ctx.Config().OutDir()) {
continue
}