Merge changes from topic "revert_vendor" am: 3e2760a539
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556737 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic7dcd298dcd104a7edc649ffc658e29b95c6e780
This commit is contained in:
@@ -449,39 +449,24 @@ func (l *libraryDecorator) collectHeadersForSnapshot(ctx android.ModuleContext)
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
glob, err := ctx.GlobWithDeps(dir+"/**/*", nil)
|
exts := headerExts
|
||||||
if err != nil {
|
// Glob all files under this special directory, because of C++ headers.
|
||||||
ctx.ModuleErrorf("glob failed: %#v", err)
|
if strings.HasPrefix(dir, "external/libcxx/include") {
|
||||||
return
|
exts = []string{""}
|
||||||
}
|
}
|
||||||
isLibcxx := strings.HasPrefix(dir, "external/libcxx/include")
|
for _, ext := range exts {
|
||||||
j := 0
|
glob, err := ctx.GlobWithDeps(dir+"/**/*"+ext, nil)
|
||||||
for i, header := range glob {
|
if err != nil {
|
||||||
if isLibcxx {
|
ctx.ModuleErrorf("glob failed: %#v", err)
|
||||||
// Glob all files under this special directory, because of C++ headers with no
|
return
|
||||||
// extension.
|
}
|
||||||
if !strings.HasSuffix(header, "/") {
|
for _, header := range glob {
|
||||||
continue
|
if strings.HasSuffix(header, "/") {
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Filter out only the files with extensions that are headers.
|
|
||||||
found := false
|
|
||||||
for _, ext := range headerExts {
|
|
||||||
if strings.HasSuffix(header, ext) {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
ret = append(ret, android.PathForSource(ctx, header))
|
||||||
}
|
}
|
||||||
if i != j {
|
|
||||||
glob[j] = glob[i]
|
|
||||||
}
|
|
||||||
j++
|
|
||||||
}
|
}
|
||||||
glob = glob[:j]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect generated headers
|
// Collect generated headers
|
||||||
|
Reference in New Issue
Block a user