Don't install host or VNDK libs to the NDK.
Test: set `static_ndk_lib: true` on compiler-rt-extras, make ndk,
`find out/soong/ndk -name '*.a'`
Bug: None
Change-Id: I6e82d3628efb602963552d3a91ee6176e8f3d2ff
diff --git a/cc/library.go b/cc/library.go
index b664a5e..d53bcfc 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -733,7 +733,8 @@
library.baseInstaller.install(ctx, file)
}
- if Bool(library.Properties.Static_ndk_lib) && library.static() {
+ if Bool(library.Properties.Static_ndk_lib) && library.static() &&
+ !ctx.useVndk() && ctx.Device() {
installPath := getNdkSysrootBase(ctx).Join(
ctx, "usr/lib", ctx.toolchain().ClangTriple(), file.Base())