From 925cb2a82248fc9efe9948d4edeeb42910b75628 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Thu, 3 Nov 2022 16:34:12 +0000 Subject: [PATCH] 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 --- cc/library.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/library.go b/cc/library.go index 41a68e3cb..ac64f8aaf 100644 --- a/cc/library.go +++ b/cc/library.go @@ -956,7 +956,7 @@ func GlobHeadersForSnapshot(ctx android.ModuleContext, paths android.Paths) andr 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 }