Export cc library factories.
am: f9e621603b
Change-Id: I729f672a778ad8747c2a480618ccfd432faba203
This commit is contained in:
commit
9fa7f9ecc1
2 changed files with 13 additions and 13 deletions
|
@ -43,7 +43,7 @@ func testCc(t *testing.T, bp string) *android.TestContext {
|
||||||
config.ProductVariables.DeviceVndkVersion = proptools.StringPtr("current")
|
config.ProductVariables.DeviceVndkVersion = proptools.StringPtr("current")
|
||||||
|
|
||||||
ctx := android.NewTestArchContext()
|
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("toolchain_library", android.ModuleFactoryAdaptor(toolchainLibraryFactory))
|
||||||
ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(llndkLibraryFactory))
|
ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(llndkLibraryFactory))
|
||||||
ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(objectFactory))
|
ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(objectFactory))
|
||||||
|
|
|
@ -109,51 +109,51 @@ type FlagExporterProperties struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
android.RegisterModuleType("cc_library_static", libraryStaticFactory)
|
android.RegisterModuleType("cc_library_static", LibraryStaticFactory)
|
||||||
android.RegisterModuleType("cc_library_shared", librarySharedFactory)
|
android.RegisterModuleType("cc_library_shared", LibrarySharedFactory)
|
||||||
android.RegisterModuleType("cc_library", libraryFactory)
|
android.RegisterModuleType("cc_library", LibraryFactory)
|
||||||
android.RegisterModuleType("cc_library_host_static", libraryHostStaticFactory)
|
android.RegisterModuleType("cc_library_host_static", LibraryHostStaticFactory)
|
||||||
android.RegisterModuleType("cc_library_host_shared", libraryHostSharedFactory)
|
android.RegisterModuleType("cc_library_host_shared", LibraryHostSharedFactory)
|
||||||
android.RegisterModuleType("cc_library_headers", libraryHeaderFactory)
|
android.RegisterModuleType("cc_library_headers", LibraryHeaderFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for combined static + shared libraries, device by default but with possible host
|
// Module factory for combined static + shared libraries, device by default but with possible host
|
||||||
// support
|
// support
|
||||||
func libraryFactory() android.Module {
|
func LibraryFactory() android.Module {
|
||||||
module, _ := NewLibrary(android.HostAndDeviceSupported)
|
module, _ := NewLibrary(android.HostAndDeviceSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for static libraries
|
// Module factory for static libraries
|
||||||
func libraryStaticFactory() android.Module {
|
func LibraryStaticFactory() android.Module {
|
||||||
module, library := NewLibrary(android.HostAndDeviceSupported)
|
module, library := NewLibrary(android.HostAndDeviceSupported)
|
||||||
library.BuildOnlyStatic()
|
library.BuildOnlyStatic()
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for shared libraries
|
// Module factory for shared libraries
|
||||||
func librarySharedFactory() android.Module {
|
func LibrarySharedFactory() android.Module {
|
||||||
module, library := NewLibrary(android.HostAndDeviceSupported)
|
module, library := NewLibrary(android.HostAndDeviceSupported)
|
||||||
library.BuildOnlyShared()
|
library.BuildOnlyShared()
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for host static libraries
|
// Module factory for host static libraries
|
||||||
func libraryHostStaticFactory() android.Module {
|
func LibraryHostStaticFactory() android.Module {
|
||||||
module, library := NewLibrary(android.HostSupported)
|
module, library := NewLibrary(android.HostSupported)
|
||||||
library.BuildOnlyStatic()
|
library.BuildOnlyStatic()
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for host shared libraries
|
// Module factory for host shared libraries
|
||||||
func libraryHostSharedFactory() android.Module {
|
func LibraryHostSharedFactory() android.Module {
|
||||||
module, library := NewLibrary(android.HostSupported)
|
module, library := NewLibrary(android.HostSupported)
|
||||||
library.BuildOnlyShared()
|
library.BuildOnlyShared()
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for header-only libraries
|
// Module factory for header-only libraries
|
||||||
func libraryHeaderFactory() android.Module {
|
func LibraryHeaderFactory() android.Module {
|
||||||
module, library := NewLibrary(android.HostAndDeviceSupported)
|
module, library := NewLibrary(android.HostAndDeviceSupported)
|
||||||
library.HeaderOnly()
|
library.HeaderOnly()
|
||||||
return module.Init()
|
return module.Init()
|
||||||
|
|
Loading…
Reference in a new issue