Fix ndk_library following decorator refactor.

am: 705c84b9ee

Change-Id: I228224014450f4cb2cdbf13bdcf3d94e8f95aa23
This commit is contained in:
Dan Albert 2016-08-08 20:49:21 +00:00 committed by android-build-merger
commit 80f3a040cd
2 changed files with 6 additions and 4 deletions

View File

@ -201,6 +201,7 @@ func (installer *baseInstaller) AndroidMk(ctx AndroidMkContext, ret *android.And
func (c *stubDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) { func (c *stubDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
ret.SubName = "." + strconv.Itoa(c.properties.ApiLevel) ret.SubName = "." + strconv.Itoa(c.properties.ApiLevel)
ret.Class = "SHARED_LIBRARIES"
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error { ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
path, file := filepath.Split(c.installPath) path, file := filepath.Split(c.installPath)

View File

@ -265,7 +265,7 @@ func (stub *stubDecorator) install(ctx ModuleContext, path android.Path) {
stub.installPath = ctx.InstallFile(installDir, path).String() stub.installPath = ctx.InstallFile(installDir, path).String()
} }
func newStubLibrary() *Module { func newStubLibrary() (*Module, []interface{}) {
module, library := NewLibrary(android.DeviceSupported, true, false) module, library := NewLibrary(android.DeviceSupported, true, false)
module.stl = nil module.stl = nil
module.sanitize = nil module.sanitize = nil
@ -278,10 +278,11 @@ func newStubLibrary() *Module {
module.linker = stub module.linker = stub
module.installer = stub module.installer = stub
return module return module, []interface{}{&stub.properties}
} }
func ndkLibraryFactory() (blueprint.Module, []interface{}) { func ndkLibraryFactory() (blueprint.Module, []interface{}) {
module := newStubLibrary() module, properties := newStubLibrary()
return module.Init() return android.InitAndroidArchModule(module, android.DeviceSupported,
android.MultilibBoth, properties...)
} }