Export static libraries.
Export static libraries through LOCAL_STATIC_LIBRARIES and
LOCAL_WHOLE_STATIC_LIBRARIES. This enables dependency-based NOTICE file
generation. Also, add a notice property in the libwinpthread module.
Bug: 36073965
Test: cc_test.go
Change-Id: If1ca1f9159e80cf8fbe71df7a13ca5d6a1f63b40
diff --git a/cc/cc.go b/cc/cc.go
index 0569563..66018d0 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -176,10 +176,12 @@
// Minimum sdk version supported when compiling against the ndk
Sdk_version *string
- AndroidMkSharedLibs []string `blueprint:"mutated"`
- AndroidMkRuntimeLibs []string `blueprint:"mutated"`
- HideFromMake bool `blueprint:"mutated"`
- PreventInstall bool `blueprint:"mutated"`
+ AndroidMkSharedLibs []string `blueprint:"mutated"`
+ AndroidMkStaticLibs []string `blueprint:"mutated"`
+ AndroidMkRuntimeLibs []string `blueprint:"mutated"`
+ AndroidMkWholeStaticLibs []string `blueprint:"mutated"`
+ HideFromMake bool `blueprint:"mutated"`
+ PreventInstall bool `blueprint:"mutated"`
UseVndk bool `blueprint:"mutated"`
@@ -1479,9 +1481,15 @@
// they merely serve as Make dependencies and do not affect this lib itself.
c.Properties.AndroidMkSharedLibs = append(
c.Properties.AndroidMkSharedLibs, makeLibName(depName))
+ case staticDepTag, staticExportDepTag, lateStaticDepTag:
+ c.Properties.AndroidMkStaticLibs = append(
+ c.Properties.AndroidMkStaticLibs, makeLibName(depName))
case runtimeDepTag:
c.Properties.AndroidMkRuntimeLibs = append(
c.Properties.AndroidMkRuntimeLibs, makeLibName(depName))
+ case wholeStaticDepTag:
+ c.Properties.AndroidMkWholeStaticLibs = append(
+ c.Properties.AndroidMkWholeStaticLibs, makeLibName(depName))
}
})