Make relative path for native_bridge binaries configurable

This change introduces NativeBridgeRelativePath and
NativeBridgeSecondaryRelativePath product variables to
make relative path to native_bridge binaries configurable.

It also removes moves information about native bridge
host architecture to Target and sets it during decodeTargetProductVariables

Test: make PRODUCT-cf_x86_phone-userdebug dist
Change-Id: Ie736e81eae507e1775566ce9f29135011b12af27
This commit is contained in:
dimitry
2019-07-11 10:23:53 +02:00
parent ae11318633
commit 8d6dde8831
6 changed files with 63 additions and 46 deletions

View File

@@ -191,15 +191,7 @@ func (a *AndroidMkEntries) fillInEntries(config Config, bpPath string, mod bluep
// Make cannot identify LOCAL_MODULE_TARGET_ARCH:= common.
if archStr != "common" {
if amod.Target().NativeBridge {
// TODO: Unhardcode these rules.
guestArchStr := archStr
hostArchStr := ""
if guestArchStr == "arm" {
hostArchStr = "x86"
} else if guestArchStr == "arm64" {
hostArchStr = "x86_64"
}
hostArchStr := amod.Target().NativeBridgeHostArchName
if hostArchStr != "" {
a.SetString("LOCAL_MODULE_TARGET_ARCH", hostArchStr)
}