Add support for exclude_srcs in genrule

Test: build iptables with Soong
Change-Id: Ibffc188868f6e9fb86fbf932c010eccf7f4233bf
This commit is contained in:
Dan Willemsen
2018-11-17 14:01:18 -08:00
parent 60e62f0c44
commit eefa026119

View File

@@ -88,6 +88,9 @@ type generatorProperties struct {
// list of input files
Srcs []string `android:"arch_variant"`
// input files to exclude
Exclude_srcs []string `android:"arch_variant"`
}
type Module struct {
@@ -228,7 +231,7 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
var srcFiles android.Paths
for _, in := range g.properties.Srcs {
paths := ctx.ExpandSources([]string{in}, nil)
paths := ctx.ExpandSources([]string{in}, g.properties.Exclude_srcs)
srcFiles = append(srcFiles, paths...)
addLocationLabel(in, paths.Strings())
}