Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82798583 authored by Dan Willemsen's avatar Dan Willemsen Committed by Gerrit Code Review
Browse files

Merge "Add support for exclude_srcs in genrule"

parents 4ff85ebe eefa0261
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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())
	}