Convert some properties to Configurable properties
Focusing on the properties needed to remove soong config modules from
packages/modules/Virtualization.
- prebuilt_etc's src and srcs
- filegroup's srcs and exclude_srcs
- rust's cfgs
Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: I6971da744a17955f98104948e6f9614776955782
diff --git a/android/filegroup.go b/android/filegroup.go
index a8326d4..ff0f74e 100644
--- a/android/filegroup.go
+++ b/android/filegroup.go
@@ -19,6 +19,7 @@
"strings"
"github.com/google/blueprint"
+ "github.com/google/blueprint/proptools"
)
func init() {
@@ -36,9 +37,9 @@
type fileGroupProperties struct {
// srcs lists files that will be included in this filegroup
- Srcs []string `android:"path"`
+ Srcs proptools.Configurable[[]string] `android:"path"`
- Exclude_srcs []string `android:"path"`
+ Exclude_srcs proptools.Configurable[[]string] `android:"path"`
// The base path to the files. May be used by other modules to determine which portion
// of the path to use. For example, when a filegroup is used as data in a cc_test rule,
@@ -89,7 +90,7 @@
}
func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) {
- fg.srcs = PathsForModuleSrcExcludes(ctx, fg.properties.Srcs, fg.properties.Exclude_srcs)
+ fg.srcs = PathsForModuleSrcExcludes(ctx, fg.properties.Srcs.GetOrDefault(ctx, nil), fg.properties.Exclude_srcs.GetOrDefault(ctx, nil))
if fg.properties.Path != nil {
fg.srcs = PathsWithModuleSrcSubDir(ctx, fg.srcs, String(fg.properties.Path))
}