diff options
author | Colin Cross <ccross@android.com> | 2016-05-17 13:15:15 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2016-05-18 22:24:19 +0000 |
commit | c7fd91a2660c7e0af1ccea0d662e0804998769ee (patch) | |
tree | 407c75773f0cc8a9c68f11c57551aeac98f2af19 /cc/cc.go | |
parent | 36cff8bb6fdff4a843dfe65cc83227b7f677dd55 (diff) | |
download | build_soong-c7fd91a2660c7e0af1ccea0d662e0804998769ee.tar.gz build_soong-c7fd91a2660c7e0af1ccea0d662e0804998769ee.tar.bz2 build_soong-c7fd91a2660c7e0af1ccea0d662e0804998769ee.zip |
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
Diffstat (limited to 'cc/cc.go')
-rw-r--r-- | cc/cc.go | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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, |