Fix checkbuild with symlinks

Soong delegates installation to make when embedded in make, so it can't
create any dependencies on installed files.  Only create the symlink
rules if not embedded in make.

Change-Id: I26d2857e6d544b963a0c52145a8666ba30864838
This commit is contained in:
Colin Cross
2016-01-11 12:49:11 -08:00
parent b4b613931f
commit 12fc4977bf

View File

@@ -567,18 +567,20 @@ func (a *androidModuleContext) InstallFile(installPath OutputPath, srcPath Path,
func (a *androidModuleContext) InstallSymlink(installPath OutputPath, name string, srcPath OutputPath) OutputPath {
fullInstallPath := installPath.Join(a, name)
a.ModuleBuild(pctx, ModuleBuildParams{
Rule: Symlink,
Output: fullInstallPath,
OrderOnly: Paths{srcPath},
Default: !a.AConfig().EmbeddedInMake(),
Args: map[string]string{
"fromPath": srcPath.String(),
},
})
if a.Host() || !a.AConfig().SkipDeviceInstall() {
a.ModuleBuild(pctx, ModuleBuildParams{
Rule: Symlink,
Output: fullInstallPath,
OrderOnly: Paths{srcPath},
Default: !a.AConfig().EmbeddedInMake(),
Args: map[string]string{
"fromPath": srcPath.String(),
},
})
a.installFiles = append(a.installFiles, fullInstallPath)
a.checkbuildFiles = append(a.checkbuildFiles, srcPath)
a.installFiles = append(a.installFiles, fullInstallPath)
a.checkbuildFiles = append(a.checkbuildFiles, srcPath)
}
return fullInstallPath
}