Replace se_filegroup to se_build_files
se_build_files is a replacement for se_filegroup module. se_build_files
can be used with the normal Soong convention ":module_name{.tag}" by
implementing android.OutputFileProducer. It's better than implementing
ad-hoc logics across various modules, which is the case for se_filegroup
module.
Test: build and boot
Change-Id: Ic0e34549601eb043145e433055f5a030eaf4347e
diff --git a/build/soong/bug_map.go b/build/soong/bug_map.go
index 00df33c..e24a21b 100644
--- a/build/soong/bug_map.go
+++ b/build/soong/bug_map.go
@@ -40,7 +40,7 @@
}
type bugMapProperties struct {
- // List of source files. Can reference se_filegroup type modules with the ":module" syntax.
+ // List of source files or se_build_files modules.
Srcs []string `android:"path"`
// Output file name. Defaults to module name if unspecified.
@@ -52,31 +52,7 @@
}
func (b *bugMap) expandSeSources(ctx android.ModuleContext) android.Paths {
- srcPaths := make(android.Paths, 0, len(b.properties.Srcs))
- for _, src := range b.properties.Srcs {
- if m := android.SrcIsModule(src); m != "" {
- module := android.GetModuleFromPathDep(ctx, m, "")
- if module == nil {
- // Error would have been handled by ExtractSourcesDeps
- continue
- }
- if fg, ok := module.(*fileGroup); ok {
- if b.SocSpecific() {
- srcPaths = append(srcPaths, fg.VendorSrcs()...)
- srcPaths = append(srcPaths, fg.SystemVendorSrcs()...)
- } else if b.SystemExtSpecific() {
- srcPaths = append(srcPaths, fg.SystemExtPrivateSrcs()...)
- } else {
- srcPaths = append(srcPaths, fg.SystemPrivateSrcs()...)
- }
- } else {
- ctx.PropertyErrorf("srcs", "%q is not an se_filegroup", m)
- }
- } else {
- srcPaths = append(srcPaths, android.PathForModuleSrc(ctx, src))
- }
- }
- return android.FirstUniquePaths(srcPaths)
+ return android.PathsForModuleSrc(ctx, b.properties.Srcs)
}
func (b *bugMap) GenerateAndroidBuildActions(ctx android.ModuleContext) {