aboutsummaryrefslogtreecommitdiffstats
path: root/genrule
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-10-23 11:27:50 -0700
committerColin Cross <ccross@android.com>2018-10-23 18:40:37 +0000
commitef35448ac579a525b59ad110c2ca32ff8f252a9e (patch)
tree5f2a6ba89281e3d2fafa664a2cc151a744a01b09 /genrule
parent5b9fde2d1588720c918ec287af9fd7c276f31986 (diff)
downloadbuild_soong-ef35448ac579a525b59ad110c2ca32ff8f252a9e.tar.gz
build_soong-ef35448ac579a525b59ad110c2ca32ff8f252a9e.tar.bz2
build_soong-ef35448ac579a525b59ad110c2ca32ff8f252a9e.zip
Allow cc_genrule srcs to vary by architecture
Add arch_variant to the genrule srcs property so that cc_genrule modules can vary the srcs and outs by architecture. Test: cc/genrule_test.go Change-Id: Idb17013e137d7ca21ca4cfc3e4c1fa7d89977043
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go4
-rw-r--r--genrule/genrule_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 2824e490..e6c6efd4 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -87,7 +87,7 @@ type generatorProperties struct {
Export_include_dirs []string
// list of input files
- Srcs []string
+ Srcs []string `android:"arch_variant"`
}
type Module struct {
@@ -504,7 +504,7 @@ func GenRuleFactory() android.Module {
type genRuleProperties struct {
// names of the output files that will be generated
- Out []string
+ Out []string `android:"arch_variant"`
}
var Bool = proptools.Bool
diff --git a/genrule/genrule_test.go b/genrule/genrule_test.go
index 7e16ce1f..a99fa18c 100644
--- a/genrule/genrule_test.go
+++ b/genrule/genrule_test.go
@@ -27,7 +27,7 @@ var buildDir string
func setUp() {
var err error
- buildDir, err = ioutil.TempDir("", "soong_java_test")
+ buildDir, err = ioutil.TempDir("", "genrule_test")
if err != nil {
panic(err)
}