Fix ndk x86_64 and mips64 builds
x86_64 and mips64 NDK prebuilt libraries are stored in .../usr/lib64, but arm64 and all the 32-bit ABIs use .../usr/lib. Add a 64 suffix to the path for all 64-bit ABIs except arm64. Change-Id: I98e87ff6a7f1aa75adbeb37c5b1e7208b953322f
This commit is contained in:
10
cc/cc.go
10
cc/cc.go
@@ -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,
|
||||
|
Reference in New Issue
Block a user