aboutsummaryrefslogtreecommitdiffstats
path: root/genrule
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-11-17 14:01:18 -0800
committerDan Willemsen <dwillemsen@google.com>2018-11-18 20:11:05 -0800
commiteefa0261190bc2f5a4ff9428b914adb60ece2018 (patch)
tree212a67d0f891d2fb621e7cb428f90679c6ee1d15 /genrule
parent60e62f0c44acd00f0caf0c695b9c879ae10b0dc2 (diff)
downloadbuild_soong-eefa0261190bc2f5a4ff9428b914adb60ece2018.tar.gz
build_soong-eefa0261190bc2f5a4ff9428b914adb60ece2018.tar.bz2
build_soong-eefa0261190bc2f5a4ff9428b914adb60ece2018.zip
Add support for exclude_srcs in genrule
Test: build iptables with Soong Change-Id: Ibffc188868f6e9fb86fbf932c010eccf7f4233bf
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index e6c6efd4..b70c075a 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -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())
}