Refactor factories
Change module factories from returning a blueprint.Module and a list of property structs to returning an android.Module, which holds the list of property structs. Test: build.ninja identical except for Factory: comment lines Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
This commit is contained in:
@@ -108,41 +108,41 @@ func init() {
|
||||
|
||||
// Module factory for combined static + shared libraries, device by default but with possible host
|
||||
// support
|
||||
func libraryFactory() (blueprint.Module, []interface{}) {
|
||||
func libraryFactory() android.Module {
|
||||
module, _ := NewLibrary(android.HostAndDeviceSupported)
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
// Module factory for static libraries
|
||||
func libraryStaticFactory() (blueprint.Module, []interface{}) {
|
||||
func libraryStaticFactory() android.Module {
|
||||
module, library := NewLibrary(android.HostAndDeviceSupported)
|
||||
library.BuildOnlyStatic()
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
// Module factory for shared libraries
|
||||
func librarySharedFactory() (blueprint.Module, []interface{}) {
|
||||
func librarySharedFactory() android.Module {
|
||||
module, library := NewLibrary(android.HostAndDeviceSupported)
|
||||
library.BuildOnlyShared()
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
// Module factory for host static libraries
|
||||
func libraryHostStaticFactory() (blueprint.Module, []interface{}) {
|
||||
func libraryHostStaticFactory() android.Module {
|
||||
module, library := NewLibrary(android.HostSupported)
|
||||
library.BuildOnlyStatic()
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
// Module factory for host shared libraries
|
||||
func libraryHostSharedFactory() (blueprint.Module, []interface{}) {
|
||||
func libraryHostSharedFactory() android.Module {
|
||||
module, library := NewLibrary(android.HostSupported)
|
||||
library.BuildOnlyShared()
|
||||
return module.Init()
|
||||
}
|
||||
|
||||
// Module factory for header-only libraries
|
||||
func libraryHeaderFactory() (blueprint.Module, []interface{}) {
|
||||
func libraryHeaderFactory() android.Module {
|
||||
module, library := NewLibrary(android.HostAndDeviceSupported)
|
||||
library.HeaderOnly()
|
||||
return module.Init()
|
||||
|
Reference in New Issue
Block a user