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

@@ -66,9 +66,12 @@ func (installer *baseInstaller) installDir(ctx ModuleContext) android.OutputPath
if ctx.toolchain().Is64Bit() && installer.dir64 != "" {
dir = installer.dir64
}
if (!ctx.Host() && !ctx.Arch().Native) || ctx.Target().NativeBridge == android.NativeBridgeEnabled {
if !ctx.Host() && !ctx.Arch().Native {
dir = filepath.Join(dir, ctx.Arch().ArchType.String())
}
if ctx.Target().NativeBridge == android.NativeBridgeEnabled {
dir = filepath.Join(dir, ctx.Target().NativeBridgeRelativePath)
}
if installer.location == InstallInData && ctx.useVndk() {
dir = filepath.Join(dir, "vendor")
}