Merge "Fix missing NOTICE targets for static libs that aren't available to platform."

This commit is contained in:
Treehugger Robot
2020-04-14 13:43:46 +00:00
committed by Gerrit Code Review
5 changed files with 34 additions and 0 deletions

View File

@@ -271,6 +271,10 @@ func (library *libraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries
entries.SubName = "." + library.stubsVersion()
}
entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) {
// Note library.skipInstall() has a special case to get here for static
// libraries that otherwise would have skipped installation and hence not
// have executed AndroidMkEntries at all. The reason is to ensure they get
// a NOTICE file make target which other libraries might depend on.
entries.SetBool("LOCAL_UNINSTALLABLE_MODULE", true)
if library.buildStubs() {
entries.SetBool("LOCAL_NO_NOTICE_FILE", true)