Build a static library for header-only libraries
library.static() was being used to determine if a library was static,
shared, or header only, which resulted in header only libraries
behaving like shared libraries, when they should be treated as static
libraries with no sources. Explicitly use library.static(),
library.shared(), and library.header() instead.
Bug: 35228396
Test: builds, manually examine changes to build.ninja and Android.mk
Change-Id: I51729992cc6338deda1396b86f12bc9f73e674d8
diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go
index 676d63d..f1bd3b5 100644
--- a/cc/ndk_prebuilt.go
+++ b/cc/ndk_prebuilt.go
@@ -194,7 +194,7 @@
libName := strings.TrimPrefix(ctx.ModuleName(), "ndk_")
libExt := flags.Toolchain.ShlibSuffix()
- if ndk.Properties.BuildStatic {
+ if ndk.static() {
libExt = staticLibraryExtension
}