Fix static_ndk_lib for sanitized libraries.
Test: build-ndk-prebuilts.sh with libc/libm included in the NDK
Bug: https://github.com/android-ndk/ndk/issues/272
Change-Id: Ic398f541036f6c16f7dc58b9af984c60ed948495
diff --git a/cc/library.go b/cc/library.go
index 0ed1848..9661f44 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -729,7 +729,8 @@
}
if Bool(library.Properties.Static_ndk_lib) && library.static() &&
- !ctx.useVndk() && ctx.Device() {
+ !ctx.useVndk() && ctx.Device() &&
+ library.sanitize.isUnsanitizedVariant() {
installPath := getNdkSysrootBase(ctx).Join(
ctx, "usr/lib", ctx.toolchain().ClangTriple(), file.Base())