diff options
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/android/module.go b/android/module.go index 52280d242..572b16230 100644 --- a/android/module.go +++ b/android/module.go @@ -147,6 +147,8 @@ type commonProperties struct { // Set by InitAndroidModule HostOrDeviceSupported HostOrDeviceSupported `blueprint:"mutated"` ArchSpecific bool `blueprint:"mutated"` + + SkipInstall bool `blueprint:"mutated"` } type hostAndDeviceProperties struct { @@ -277,10 +279,17 @@ type ModuleBase struct { hooks hooks } +// Name returns the name of the module. It may be overridden by individual module types, for +// example prebuilts will prepend prebuilt_ to the name. func (a *ModuleBase) Name() string { return a.nameProperties.Name } +// BaseModuleName returns the name of the module as specified in the blueprints file. +func (a *ModuleBase) BaseModuleName() string { + return a.nameProperties.Name +} + func (a *ModuleBase) base() *ModuleBase { return a } @@ -348,6 +357,10 @@ func (a *ModuleBase) Enabled() bool { return *a.commonProperties.Enabled } +func (a *ModuleBase) SkipInstall() { + a.commonProperties.SkipInstall = true +} + func (a *ModuleBase) computeInstallDeps( ctx blueprint.ModuleContext) Paths { @@ -600,7 +613,9 @@ func (a *androidModuleContext) InstallFileName(installPath OutputPath, name stri fullInstallPath := installPath.Join(a, name) a.module.base().hooks.runInstallHooks(a, fullInstallPath, false) - if a.Host() || !a.AConfig().SkipDeviceInstall() { + if !a.module.base().commonProperties.SkipInstall && + (a.Host() || !a.AConfig().SkipDeviceInstall()) { + deps = append(deps, a.installDeps...) var implicitDeps, orderOnlyDeps Paths @@ -636,7 +651,9 @@ func (a *androidModuleContext) InstallSymlink(installPath OutputPath, name strin fullInstallPath := installPath.Join(a, name) a.module.base().hooks.runInstallHooks(a, fullInstallPath, true) - if a.Host() || !a.AConfig().SkipDeviceInstall() { + if !a.module.base().commonProperties.SkipInstall && + (a.Host() || !a.AConfig().SkipDeviceInstall()) { + a.ModuleBuild(pctx, ModuleBuildParams{ Rule: Symlink, Output: fullInstallPath, |