From ea4b7b9cedde900b2f20ded34ed1f2fabe78e35d Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 25 Apr 2018 16:05:30 -0700 Subject: [PATCH] Fix incomplete LTO bug workaround. https://android-review.googlesource.com/c/platform/build/soong/+/641827 forgot this use of ClangTriple(), so static libraries aren't being installed to the correct place. Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \ build/soong/scripts/build-ndk-prebuilts.sh && \ ls ndk-out/soong/ndk/sysroot/usr/lib Bug: None Change-Id: I750ab198deff92aac06935d38d529b53030f9636 --- cc/library.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cc/library.go b/cc/library.go index 00dc86b57..4a7884b74 100644 --- a/cc/library.go +++ b/cc/library.go @@ -21,6 +21,7 @@ import ( "github.com/google/blueprint/pathtools" "android/soong/android" + "android/soong/cc/config" ) type LibraryProperties struct { @@ -747,7 +748,7 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) { !ctx.useVndk() && ctx.Device() && library.sanitize.isUnsanitizedVariant() { installPath := getNdkSysrootBase(ctx).Join( - ctx, "usr/lib", ctx.toolchain().ClangTriple(), file.Base()) + ctx, "usr/lib", config.NDKTriple(ctx.toolchain()), file.Base()) ctx.ModuleBuild(pctx, android.ModuleBuildParams{ Rule: android.Cp,