Merge "Fix missing snapshot headers." am: 9d54139763 am: db27fa0986 am: 9c3fe4daa8

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1658921

Change-Id: I13a5641d55b8df4225bf7154154e69eb47a2eed6
This commit is contained in:
Jose "Pepe" Galmes 2021-03-31 05:58:57 +00:00 committed by Automerger Merge Worker
commit 99e56981b1
1 changed files with 3 additions and 8 deletions

View File

@ -504,12 +504,11 @@ func (l *libraryDecorator) collectHeadersForSnapshot(ctx android.ModuleContext)
return return
} }
isLibcxx := strings.HasPrefix(dir, "external/libcxx/include") isLibcxx := strings.HasPrefix(dir, "external/libcxx/include")
j := 0 for _, header := range glob {
for i, header := range glob {
if isLibcxx { if isLibcxx {
// Glob all files under this special directory, because of C++ headers with no // Glob all files under this special directory, because of C++ headers with no
// extension. // extension.
if !strings.HasSuffix(header, "/") { if strings.HasSuffix(header, "/") {
continue continue
} }
} else { } else {
@ -525,12 +524,8 @@ func (l *libraryDecorator) collectHeadersForSnapshot(ctx android.ModuleContext)
continue continue
} }
} }
if i != j { ret = append(ret, android.PathForSource(ctx, header))
glob[j] = glob[i]
}
j++
} }
glob = glob[:j]
} }
// Collect generated headers // Collect generated headers