Split cc_prebuilt_shared_library into static variants

Prebuilts must have every variant that their source module has, so
split all cc_prebuilt_shared_library modules into both static and
shared variants.

Test: m -j checkbuild
Change-Id: I3c32315227f779e832e041cfab604ff7402c7e13
This commit is contained in:
Colin Cross
2016-11-23 15:45:05 -08:00
parent 0f3c72fa17
commit bba99041db
2 changed files with 6 additions and 3 deletions

View File

@@ -845,8 +845,10 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
} }
if tag == reuseObjTag { if tag == reuseObjTag {
depPaths.Objs = depPaths.Objs.Append(cc.compiler.(libraryInterface).reuseObjs()) if l, ok := cc.compiler.(libraryInterface); ok {
return depPaths.Objs = depPaths.Objs.Append(l.reuseObjs())
return
}
} }
if t, ok := tag.(dependencyTag); ok && t.library { if t, ok := tag.(dependencyTag); ok && t.library {

View File

@@ -60,13 +60,14 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext,
} }
func prebuiltSharedLibraryFactory() (blueprint.Module, []interface{}) { func prebuiltSharedLibraryFactory() (blueprint.Module, []interface{}) {
module, library := NewLibrary(android.HostAndDeviceSupported, true, false) module, library := NewLibrary(android.HostAndDeviceSupported, true, true)
module.compiler = nil module.compiler = nil
prebuilt := &prebuiltLibraryLinker{ prebuilt := &prebuiltLibraryLinker{
libraryDecorator: library, libraryDecorator: library,
} }
module.linker = prebuilt module.linker = prebuilt
module.installer = prebuilt
return module.Init() return module.Init()
} }