diff options
author | Colin Cross <ccross@android.com> | 2017-04-26 17:34:03 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-04-27 12:21:24 -0700 |
commit | 893d816a6d808264c2c490229832ce5b9ca7896d (patch) | |
tree | 06856c9255c2eae388c91927d3deef79f90012e4 /android/module.go | |
parent | ccf01e755eb14b0caab40a58013edf672fde3ab6 (diff) | |
download | build_soong-893d816a6d808264c2c490229832ce5b9ca7896d.tar.gz build_soong-893d816a6d808264c2c490229832ce5b9ca7896d.tar.bz2 build_soong-893d816a6d808264c2c490229832ce5b9ca7896d.zip |
Turn installation on in mega device build
Turn on installation in the mega device build, it is necessary for the ndk
sysroot installation. Partially fixes mega device builds, they also need
to run without -w dupbuild=err on the ninja command line because multiple
variants of the same architecture try to install to the same ndk sysroot.
Test: mega device build
Change-Id: I982d77f9ff19f5bc29fc9fe54a0df8db3579c3e3
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/android/module.go b/android/module.go index d485fbc2..a38c6177 100644 --- a/android/module.go +++ b/android/module.go @@ -647,14 +647,31 @@ func (a *androidModuleContext) InstallInSanitizerDir() bool { return a.module.InstallInSanitizerDir() } +func (a *androidModuleContext) skipInstall(fullInstallPath OutputPath) bool { + if a.module.base().commonProperties.SkipInstall { + return true + } + + if a.Device() { + if a.AConfig().SkipDeviceInstall() { + return true + } + + if a.AConfig().SkipMegaDeviceInstall(fullInstallPath.String()) { + return true + } + } + + return false +} + func (a *androidModuleContext) InstallFileName(installPath OutputPath, name string, srcPath Path, deps ...Path) OutputPath { fullInstallPath := installPath.Join(a, name) a.module.base().hooks.runInstallHooks(a, fullInstallPath, false) - if !a.module.base().commonProperties.SkipInstall && - (!a.Device() || !a.AConfig().SkipDeviceInstall()) { + if !a.skipInstall(fullInstallPath) { deps = append(deps, a.installDeps...) @@ -691,8 +708,7 @@ func (a *androidModuleContext) InstallSymlink(installPath OutputPath, name strin fullInstallPath := installPath.Join(a, name) a.module.base().hooks.runInstallHooks(a, fullInstallPath, true) - if !a.module.base().commonProperties.SkipInstall && - (!a.Device() || !a.AConfig().SkipDeviceInstall()) { + if !a.skipInstall(fullInstallPath) { a.ModuleBuild(pctx, ModuleBuildParams{ Rule: Symlink, |