Merge "Expose the NDK STLs to make."

This commit is contained in:
Treehugger Robot
2017-12-19 00:29:52 +00:00
committed by Gerrit Code Review
2 changed files with 15 additions and 1 deletions

View File

@@ -372,3 +372,14 @@ func (c *vndkPrebuiltLibraryDecorator) AndroidMk(ctx AndroidMkContext, ret *andr
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
})
}
func (c *ndkPrebuiltStlLinker) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
ret.Class = "SHARED_LIBRARIES"
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
// Prevent make from installing the libraries to obj/lib (since we have
// dozens of libraries with the same name, they'll clobber each other
// and the real versions of the libraries from the platform).
fmt.Fprintln(w, "LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES := false")
})
}

View File

@@ -141,7 +141,10 @@ func ndkPrebuiltSharedStlFactory() android.Module {
module.compiler = nil
module.linker = linker
module.installer = nil
module.Properties.HideFromMake = true
minVersionString := "minimum"
noStlString := "none"
module.Properties.Sdk_version = &minVersionString
module.stl.Properties.Stl = &noStlString
return module.Init()
}