Use version mutator for NDK

The ndk_api mutator is similar to the version mutator.  Move the
ndk_library ndk_api variations into the version mutator instead,
which will help later when consolidating the stubs handling
between NDK, LLDNK and Apex libraries.

Test: No change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: I51417cf669265762c15f7289e1dc186d017ef4a9
This commit is contained in:
Colin Cross
2020-09-30 11:41:33 -07:00
parent 8e21aa54eb
commit 5ec407b594
5 changed files with 38 additions and 23 deletions

View File

@@ -442,6 +442,11 @@ func (c *stubDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *android.
entries.SubName = ndkLibrarySuffix + "." + c.apiLevel.String()
entries.Class = "SHARED_LIBRARIES"
if !c.buildStubs() {
entries.Disabled = true
return
}
entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) {
path, file := filepath.Split(c.installPath.String())
stem, suffix, _ := android.SplitFileExt(file)