summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-11-25 22:30:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-11-25 22:30:17 +0000
commit09ef474b6f797eb4f81e65b1736be30fbb3dd9cf (patch)
treebf03e0eab4434dc6defff90cbe0d0a23e3b78403 /android/module.go
parent4b49b768a2cb7d455aea5347d27d9045b8c481fa (diff)
parent7228ecd5e3c9282e7e6f4a81d81fd333cb08eaff (diff)
Merge changes I0dcc9c7b,I9bc40642
* changes: Move cc.imageMutator into the android package Make CreateVariations return []android.Module
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index 891babc32..5b2f9d39c 100644
--- a/android/module.go
+++ b/android/module.go
@@ -431,6 +431,9 @@ type commonProperties struct {
DebugName string `blueprint:"mutated"`
DebugMutators []string `blueprint:"mutated"`
DebugVariations []string `blueprint:"mutated"`
+
+ // set by ImageMutator
+ ImageVariation string `blueprint:"mutated"`
}
type hostAndDeviceProperties struct {
@@ -865,6 +868,21 @@ func (m *ModuleBase) NoticeFile() OptionalPath {
return m.noticeFile
}
+func (m *ModuleBase) setImageVariation(variant string) {
+ m.commonProperties.ImageVariation = variant
+}
+
+func (m *ModuleBase) ImageVariation() blueprint.Variation {
+ return blueprint.Variation{
+ Mutator: "image",
+ Variation: m.base().commonProperties.ImageVariation,
+ }
+}
+
+func (m *ModuleBase) InRecovery() bool {
+ return m.base().commonProperties.ImageVariation == RecoveryVariation
+}
+
func (m *ModuleBase) generateModuleTarget(ctx ModuleContext) {
allInstalledFiles := Paths{}
allCheckbuildFiles := Paths{}