Incorporate cc_library_shared into mixed builds
The infrastructure is already there via its need in
`cc_library`. Therefore, just enable it by setting
the `bazelHandler` in `LibrarySharedFactory`, and
add a test to verify the functionality.
Bug: 198817980
Test: cc/library_test.go:TestCcLibrarySharedWithBazel
Change-Id: Ibff80616632af59a0e409110f8645e028f99c7d6
diff --git a/cc/library.go b/cc/library.go
index 8a663ff..47351ba 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -370,6 +370,7 @@
module, library := NewLibrary(android.HostAndDeviceSupported)
library.BuildOnlyShared()
module.sdkMemberTypes = []android.SdkMemberType{sharedLibrarySdkMemberType}
+ module.bazelHandler = &ccLibraryBazelHandler{module: module}
return module.Init()
}