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:
@@ -18,8 +18,6 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
|
||||
"android/soong/android"
|
||||
)
|
||||
|
||||
@@ -136,7 +134,7 @@ func (stub *llndkStubDecorator) link(ctx ModuleContext, flags Flags, deps PathDe
|
||||
return stub.libraryDecorator.link(ctx, flags, deps, objs)
|
||||
}
|
||||
|
||||
func newLLndkStubLibrary() (*Module, []interface{}) {
|
||||
func newLLndkStubLibrary() *Module {
|
||||
module, library := NewLibrary(android.DeviceSupported)
|
||||
library.BuildOnlyShared()
|
||||
module.stl = nil
|
||||
@@ -150,13 +148,18 @@ func newLLndkStubLibrary() (*Module, []interface{}) {
|
||||
module.linker = stub
|
||||
module.installer = nil
|
||||
|
||||
return module, []interface{}{&stub.Properties, &library.MutatedProperties, &library.flagExporter.Properties}
|
||||
module.AddProperties(
|
||||
&stub.Properties,
|
||||
&library.MutatedProperties,
|
||||
&library.flagExporter.Properties)
|
||||
|
||||
return module
|
||||
}
|
||||
|
||||
func llndkLibraryFactory() (blueprint.Module, []interface{}) {
|
||||
module, properties := newLLndkStubLibrary()
|
||||
return android.InitAndroidArchModule(module, android.DeviceSupported,
|
||||
android.MultilibBoth, properties...)
|
||||
func llndkLibraryFactory() android.Module {
|
||||
module := newLLndkStubLibrary()
|
||||
android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth)
|
||||
return module
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
Reference in New Issue
Block a user