diff options
author | Colin Cross <ccross@android.com> | 2017-06-23 15:06:31 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-06-30 21:08:36 +0000 |
commit | 36242850fdad11b4e6fbe061ef30f62e7e8c08d8 (patch) | |
tree | a3ca380533afd39e733c658560f87effb1ee0a46 /cc/llndk_library.go | |
parent | 48173891485a22c9cab0e48f90a3a23be212f44a (diff) | |
download | build_soong-36242850fdad11b4e6fbe061ef30f62e7e8c08d8.tar.gz build_soong-36242850fdad11b4e6fbe061ef30f62e7e8c08d8.tar.bz2 build_soong-36242850fdad11b4e6fbe061ef30f62e7e8c08d8.zip |
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
Diffstat (limited to 'cc/llndk_library.go')
-rw-r--r-- | cc/llndk_library.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cc/llndk_library.go b/cc/llndk_library.go index cde1bc79..66ffc9fe 100644 --- a/cc/llndk_library.go +++ b/cc/llndk_library.go @@ -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() { |