Call ctx.InstallFile for uninstallable cc modules
SkipInstall is actually primarily used to prevent making a module visible to Make, rename it and add new SkipInstall that actually skips installation without affecting Make. Call c.SkipInstall() for uninstallable cc modules to allow calling c.installer.install, which will collect PackagingSpecs for uninstallable cc modules, allowing them to be used by genrules. Bug: 124313442 Test: m checkbuild Change-Id: I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a
This commit is contained in:
22
cc/cc.go
22
cc/cc.go
@@ -1580,18 +1580,24 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
|
||||
}
|
||||
}
|
||||
|
||||
if c.installable(apexInfo) {
|
||||
if !proptools.BoolDefault(c.Properties.Installable, true) {
|
||||
// If the module has been specifically configure to not be installed then
|
||||
// hide from make as otherwise it will break when running inside make
|
||||
// as the output path to install will not be specified. Not all uninstallable
|
||||
// modules can be hidden from make as some are needed for resolving make side
|
||||
// dependencies.
|
||||
c.HideFromMake()
|
||||
} else if !c.installable(apexInfo) {
|
||||
c.SkipInstall()
|
||||
}
|
||||
|
||||
// Still call c.installer.install though, the installs will be stored as PackageSpecs
|
||||
// to allow using the outputs in a genrule.
|
||||
if c.installer != nil && c.outputFile.Valid() {
|
||||
c.installer.install(ctx, c.outputFile.Path())
|
||||
if ctx.Failed() {
|
||||
return
|
||||
}
|
||||
} else if !proptools.BoolDefault(c.Properties.Installable, true) {
|
||||
// If the module has been specifically configure to not be installed then
|
||||
// skip the installation as otherwise it will break when running inside make
|
||||
// as the output path to install will not be specified. Not all uninstallable
|
||||
// modules can skip installation as some are needed for resolving make side
|
||||
// dependencies.
|
||||
c.SkipInstall()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user