Some clarifications in preparation to automatically order linker dependencies

Test: Browse the code and determine whether it's easier to understand
Bug: 66260943
Change-Id: I88c24a8a31ef68f428919087d206433659265684
This commit is contained in:
Jeff Gaston
2017-09-27 17:01:44 -07:00
committed by Colin Cross
parent 16b9ce4dff
commit af3cc2d23c
19 changed files with 219 additions and 211 deletions

View File

@@ -30,7 +30,7 @@ var (
type AndroidMkContext interface {
Target() android.Target
subAndroidMk(*android.AndroidMkData, interface{})
vndk() bool
useVndk() bool
}
type subAndroidMkProvider interface {
@@ -64,14 +64,14 @@ func (c *Module) AndroidMk() android.AndroidMkData {
if len(c.Properties.AndroidMkSharedLibs) > 0 {
fmt.Fprintln(w, "LOCAL_SHARED_LIBRARIES := "+strings.Join(c.Properties.AndroidMkSharedLibs, " "))
}
if c.Target().Os == android.Android && c.Properties.Sdk_version != "" && !c.vndk() {
if c.Target().Os == android.Android && c.Properties.Sdk_version != "" && !c.useVndk() {
fmt.Fprintln(w, "LOCAL_SDK_VERSION := "+c.Properties.Sdk_version)
fmt.Fprintln(w, "LOCAL_NDK_STL_VARIANT := none")
} else {
// These are already included in LOCAL_SHARED_LIBRARIES
fmt.Fprintln(w, "LOCAL_CXX_STL := none")
}
if c.vndk() {
if c.useVndk() {
fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
}
},
@@ -89,7 +89,7 @@ func (c *Module) AndroidMk() android.AndroidMkData {
}
c.subAndroidMk(&ret, c.installer)
if c.vndk() && c.hasVendorVariant() {
if c.useVndk() && c.hasVendorVariant() {
// .vendor suffix is added only when we will have two variants: core and vendor.
// The suffix is not added for vendor-only module.
ret.SubName += vendorSuffix
@@ -161,7 +161,7 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An
}
fmt.Fprintln(w, "LOCAL_MODULE_HOST_OS :=", makeOs)
fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
} else if ctx.vndk() {
} else if ctx.useVndk() {
fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
}