Export cc library factories.

am: f9e621603b

Change-Id: I729f672a778ad8747c2a480618ccfd432faba203
This commit is contained in:
Steven Moreland 2017-11-03 01:41:06 +00:00 committed by android-build-merger
commit 9fa7f9ecc1
2 changed files with 13 additions and 13 deletions

View file

@ -43,7 +43,7 @@ func testCc(t *testing.T, bp string) *android.TestContext {
config.ProductVariables.DeviceVndkVersion = proptools.StringPtr("current")
ctx := android.NewTestArchContext()
ctx.RegisterModuleType("cc_library", android.ModuleFactoryAdaptor(libraryFactory))
ctx.RegisterModuleType("cc_library", android.ModuleFactoryAdaptor(LibraryFactory))
ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(toolchainLibraryFactory))
ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(llndkLibraryFactory))
ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(objectFactory))

View file

@ -109,51 +109,51 @@ type FlagExporterProperties struct {
}
func init() {
android.RegisterModuleType("cc_library_static", libraryStaticFactory)
android.RegisterModuleType("cc_library_shared", librarySharedFactory)
android.RegisterModuleType("cc_library", libraryFactory)
android.RegisterModuleType("cc_library_host_static", libraryHostStaticFactory)
android.RegisterModuleType("cc_library_host_shared", libraryHostSharedFactory)
android.RegisterModuleType("cc_library_headers", libraryHeaderFactory)
android.RegisterModuleType("cc_library_static", LibraryStaticFactory)
android.RegisterModuleType("cc_library_shared", LibrarySharedFactory)
android.RegisterModuleType("cc_library", LibraryFactory)
android.RegisterModuleType("cc_library_host_static", LibraryHostStaticFactory)
android.RegisterModuleType("cc_library_host_shared", LibraryHostSharedFactory)
android.RegisterModuleType("cc_library_headers", LibraryHeaderFactory)
}
// Module factory for combined static + shared libraries, device by default but with possible host
// support
func libraryFactory() android.Module {
func LibraryFactory() android.Module {
module, _ := NewLibrary(android.HostAndDeviceSupported)
return module.Init()
}
// Module factory for static libraries
func libraryStaticFactory() android.Module {
func LibraryStaticFactory() android.Module {
module, library := NewLibrary(android.HostAndDeviceSupported)
library.BuildOnlyStatic()
return module.Init()
}
// Module factory for shared libraries
func librarySharedFactory() android.Module {
func LibrarySharedFactory() android.Module {
module, library := NewLibrary(android.HostAndDeviceSupported)
library.BuildOnlyShared()
return module.Init()
}
// Module factory for host static libraries
func libraryHostStaticFactory() android.Module {
func LibraryHostStaticFactory() android.Module {
module, library := NewLibrary(android.HostSupported)
library.BuildOnlyStatic()
return module.Init()
}
// Module factory for host shared libraries
func libraryHostSharedFactory() android.Module {
func LibraryHostSharedFactory() android.Module {
module, library := NewLibrary(android.HostSupported)
library.BuildOnlyShared()
return module.Init()
}
// Module factory for header-only libraries
func libraryHeaderFactory() android.Module {
func LibraryHeaderFactory() android.Module {
module, library := NewLibrary(android.HostAndDeviceSupported)
library.HeaderOnly()
return module.Init()