Add support for using cc_library in sdk/module_exports
Added link type support in module creation code as cc_prebuilt_library
has to provide both shared and static libraries.
Had to add some calls to FirstUniquePaths() around the include dirs
settings in library_sdk_member as otherwise the shared variant contains
duplicate include dirs (presumably because it gets one set from its
dependency on the static variant and one set of its own). That
difference in include dirs causes problems in the generated
cc_prebuilt_library.
Test: m nothing
Bug: 142918168
Change-Id: Ie7f23fc2341c83c7814cc98e3970df4f5d4c8423
diff --git a/android/module.go b/android/module.go
index 2e33056..057a5c7 100644
--- a/android/module.go
+++ b/android/module.go
@@ -985,6 +985,16 @@
}
}
+func (m *ModuleBase) getVariationByMutatorName(mutator string) string {
+ for i, v := range m.commonProperties.DebugMutators {
+ if v == mutator {
+ return m.commonProperties.DebugVariations[i]
+ }
+ }
+
+ return ""
+}
+
func (m *ModuleBase) InRamdisk() bool {
return m.base().commonProperties.ImageVariation == RamdiskVariation
}