Fix ndk x86_64 and mips64 builds am: c7fd91a266 am: 24280d5a63

am: 424b5d26aa

* commit '424b5d26aa53ed0568428b63ddfc83138e61aa53':
  Fix ndk x86_64 and mips64 builds

Change-Id: Iea032fc5ce1f99fdc9fbf3fa9308eb3e53f792e8
This commit is contained in:
Colin Cross
2016-05-18 22:59:57 +00:00
committed by android-build-merger

View File

@@ -2321,8 +2321,14 @@ func (*toolchainLibraryLinker) installable() bool {
// than to the system image).
func getNdkLibDir(ctx common.AndroidModuleContext, toolchain Toolchain, version string) common.SourcePath {
return common.PathForSource(ctx, fmt.Sprintf("prebuilts/ndk/current/platforms/android-%s/arch-%s/usr/lib",
version, toolchain.Name()))
suffix := ""
// Most 64-bit NDK prebuilts store libraries in "lib64", except for arm64 which is not a
// multilib toolchain and stores the libraries in "lib".
if toolchain.Is64Bit() && ctx.Arch().ArchType != common.Arm64 {
suffix = "64"
}
return common.PathForSource(ctx, fmt.Sprintf("prebuilts/ndk/current/platforms/android-%s/arch-%s/usr/lib%s",
version, toolchain.Name(), suffix))
}
func ndkPrebuiltModuleToPath(ctx common.AndroidModuleContext, toolchain Toolchain,