diff --git a/cc/cc.go b/cc/cc.go index d04485d71..640c55274 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -35,11 +35,11 @@ func init() { android.PreDepsMutators(func(ctx android.RegisterMutatorsContext) { ctx.BottomUp("image", imageMutator).Parallel() - ctx.BottomUp("link", linkageMutator).Parallel() + ctx.BottomUp("link", LinkageMutator).Parallel() ctx.BottomUp("vndk", vndkMutator).Parallel() ctx.BottomUp("ndk_api", ndkApiMutator).Parallel() ctx.BottomUp("test_per_src", testPerSrcMutator).Parallel() - ctx.BottomUp("begin", beginMutator).Parallel() + ctx.BottomUp("begin", BeginMutator).Parallel() }) android.PostDepsMutators(func(ctx android.RegisterMutatorsContext) { @@ -1093,7 +1093,7 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) { } } -func beginMutator(ctx android.BottomUpMutatorContext) { +func BeginMutator(ctx android.BottomUpMutatorContext) { if c, ok := ctx.Module().(*Module); ok && c.Enabled() { c.beginMutator(ctx) } diff --git a/cc/cc_test.go b/cc/cc_test.go index 01beb66c1..bca26ea24 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -56,17 +56,17 @@ func createTestContext(t *testing.T, config android.Config, bp string) *android. ctx.RegisterModuleType("cc_library", android.ModuleFactoryAdaptor(LibraryFactory)) ctx.RegisterModuleType("cc_library_shared", android.ModuleFactoryAdaptor(LibrarySharedFactory)) ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(LibraryHeaderFactory)) - ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(toolchainLibraryFactory)) + ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(ToolchainLibraryFactory)) ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(llndkLibraryFactory)) ctx.RegisterModuleType("llndk_headers", android.ModuleFactoryAdaptor(llndkHeadersFactory)) ctx.RegisterModuleType("vendor_public_library", android.ModuleFactoryAdaptor(vendorPublicLibraryFactory)) - ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(objectFactory)) + ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(ObjectFactory)) ctx.RegisterModuleType("filegroup", android.ModuleFactoryAdaptor(android.FileGroupFactory)) ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) { ctx.BottomUp("image", imageMutator).Parallel() - ctx.BottomUp("link", linkageMutator).Parallel() + ctx.BottomUp("link", LinkageMutator).Parallel() ctx.BottomUp("vndk", vndkMutator).Parallel() - ctx.BottomUp("begin", beginMutator).Parallel() + ctx.BottomUp("begin", BeginMutator).Parallel() }) ctx.Register() diff --git a/cc/library.go b/cc/library.go index 0e45af951..4f9b5b2b4 100644 --- a/cc/library.go +++ b/cc/library.go @@ -821,7 +821,7 @@ func reuseStaticLibrary(mctx android.BottomUpMutatorContext, static, shared *Mod } } -func linkageMutator(mctx android.BottomUpMutatorContext) { +func LinkageMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*Module); ok && m.linker != nil { if library, ok := m.linker.(libraryInterface); ok { var modules []blueprint.Module diff --git a/cc/ndk_library.go b/cc/ndk_library.go index 2709a89b6..63d9f2994 100644 --- a/cc/ndk_library.go +++ b/cc/ndk_library.go @@ -61,7 +61,7 @@ var ( // These libraries have migrated over to the new ndk_library, which is added // as a variation dependency via depsMutator. ndkMigratedLibs = []string{} - ndkMigratedLibsLock sync.Mutex // protects ndkMigratedLibs writes during parallel beginMutator + ndkMigratedLibsLock sync.Mutex // protects ndkMigratedLibs writes during parallel BeginMutator ) // Creates a stub shared library based on the provided version file. diff --git a/cc/object.go b/cc/object.go index 7c134ac38..257719512 100644 --- a/cc/object.go +++ b/cc/object.go @@ -25,7 +25,7 @@ import ( // func init() { - android.RegisterModuleType("cc_object", objectFactory) + android.RegisterModuleType("cc_object", ObjectFactory) } type objectLinker struct { @@ -33,7 +33,7 @@ type objectLinker struct { Properties ObjectLinkerProperties } -func objectFactory() android.Module { +func ObjectFactory() android.Module { module := newBaseModule(android.HostAndDeviceSupported, android.MultilibBoth) module.linker = &objectLinker{ baseLinker: NewBaseLinker(nil), diff --git a/cc/toolchain_library.go b/cc/toolchain_library.go index 20b0f8560..742d1c179 100644 --- a/cc/toolchain_library.go +++ b/cc/toolchain_library.go @@ -23,7 +23,7 @@ import ( // func init() { - android.RegisterModuleType("toolchain_library", toolchainLibraryFactory) + android.RegisterModuleType("toolchain_library", ToolchainLibraryFactory) } type toolchainLibraryProperties struct { @@ -48,7 +48,7 @@ func (library *toolchainLibraryDecorator) linkerProps() []interface{} { return append(props, &library.Properties) } -func toolchainLibraryFactory() android.Module { +func ToolchainLibraryFactory() android.Module { module, library := NewLibrary(android.HostAndDeviceSupported) library.BuildOnlyStatic() toolchainLibrary := &toolchainLibraryDecorator{