aboutsummaryrefslogtreecommitdiffstats
path: root/android/module.go
diff options
context:
space:
mode:
authorSam Mortimer <sam@mortimer.me.uk>2019-10-07 11:41:14 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-11 19:03:43 +0200
commitefa6a129b0954708e575069bef56fce1e234f0da (patch)
treeb3d135cc5e3da7b5cc8f1886ce3765028367c796 /android/module.go
parent094c1b049a74506798c33d023a2a0df3506947c9 (diff)
downloadandroid_build_soong-efa6a129b0954708e575069bef56fce1e234f0da.tar.gz
android_build_soong-efa6a129b0954708e575069bef56fce1e234f0da.tar.bz2
android_build_soong-efa6a129b0954708e575069bef56fce1e234f0da.zip
soong: Give priority to modules in exported namespaces for bootjars
* Looking for modules that provide a boot jar is currently done by module name match only. This breaks when you have multiple copies of the same module in your build tree (eg in another device). * Add a new mutator that marks the modules that should be used for bootjar content. * The logic is simple: give priority to modules that are in exported soong namespace. Change-Id: I2476174b892475c14a9f10b5e66b8496186f81c0
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index 495efbe1..17ddb050 100644
--- a/android/module.go
+++ b/android/module.go
@@ -304,6 +304,9 @@ type commonProperties struct {
SkipInstall bool `blueprint:"mutated"`
NamespaceExportedToMake bool `blueprint:"mutated"`
+
+ // Whether this module provides a boot jar
+ BootJarProvider bool `blueprint:"mutated"`
}
type hostAndDeviceProperties struct {
@@ -521,6 +524,10 @@ func (a *ModuleBase) Name() string {
return String(a.nameProperties.Name)
}
+func (a *ModuleBase) BootJarProvider() bool {
+ return a.commonProperties.BootJarProvider
+}
+
// BaseModuleName returns the name of the module as specified in the blueprints file.
func (a *ModuleBase) BaseModuleName() string {
return String(a.nameProperties.Name)