diff --git a/cc/cc.go b/cc/cc.go index e8df8e67b..512fe8eb4 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -38,7 +38,7 @@ func init() { android.PreDepsMutators(func(ctx android.RegisterMutatorsContext) { ctx.BottomUp("vndk", VndkMutator).Parallel() ctx.BottomUp("link", LinkageMutator).Parallel() - ctx.BottomUp("ndk_api", ndkApiMutator).Parallel() + ctx.BottomUp("ndk_api", NdkApiMutator).Parallel() ctx.BottomUp("test_per_src", TestPerSrcMutator).Parallel() ctx.BottomUp("version", VersionMutator).Parallel() ctx.BottomUp("begin", BeginMutator).Parallel() diff --git a/cc/ndk_library.go b/cc/ndk_library.go index c47cbf077..d5296222c 100644 --- a/cc/ndk_library.go +++ b/cc/ndk_library.go @@ -228,7 +228,7 @@ func generateStubApiVariants(mctx android.BottomUpMutatorContext, c *stubDecorat } } -func ndkApiMutator(mctx android.BottomUpMutatorContext) { +func NdkApiMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*Module); ok { if m.Enabled() { if compiler, ok := m.compiler.(*stubDecorator); ok { @@ -389,7 +389,7 @@ func newStubLibrary() *Module { // ndk_library creates a stub library that exposes dummy implementation // of functions and variables for use at build time only. -func ndkLibraryFactory() android.Module { +func NdkLibraryFactory() android.Module { module := newStubLibrary() android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth) module.ModuleBase.EnableNativeBridgeSupportByDefault() diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go index 4356732ef..e849aeea4 100644 --- a/cc/ndk_prebuilt.go +++ b/cc/ndk_prebuilt.go @@ -23,8 +23,8 @@ import ( ) func init() { - android.RegisterModuleType("ndk_prebuilt_object", ndkPrebuiltObjectFactory) - android.RegisterModuleType("ndk_prebuilt_static_stl", ndkPrebuiltStaticStlFactory) + android.RegisterModuleType("ndk_prebuilt_object", NdkPrebuiltObjectFactory) + android.RegisterModuleType("ndk_prebuilt_static_stl", NdkPrebuiltStaticStlFactory) android.RegisterModuleType("ndk_prebuilt_shared_stl", NdkPrebuiltSharedStlFactory) } @@ -68,7 +68,7 @@ func (*ndkPrebuiltObjectLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { // operations. Soong's module name format is ndk_.o. where // the object is located under // ./prebuilts/ndk/current/platforms/android-/arch-$(HOST_ARCH)/usr/lib/.o. -func ndkPrebuiltObjectFactory() android.Module { +func NdkPrebuiltObjectFactory() android.Module { module := newBaseModule(android.DeviceSupported, android.MultilibBoth) module.ModuleBase.EnableNativeBridgeSupportByDefault() module.linker = &ndkPrebuiltObjectLinker{ @@ -126,7 +126,7 @@ func NdkPrebuiltSharedStlFactory() android.Module { // library (stl) library for linking operation. The soong's module name format // is ndk_.a where the library is located under // ./prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/$(HOST_ARCH)/.a. -func ndkPrebuiltStaticStlFactory() android.Module { +func NdkPrebuiltStaticStlFactory() android.Module { module, library := NewLibrary(android.DeviceSupported) library.BuildOnlyStatic() module.compiler = nil diff --git a/cc/ndk_sysroot.go b/cc/ndk_sysroot.go index f6de4ef6e..56fd54b8a 100644 --- a/cc/ndk_sysroot.go +++ b/cc/ndk_sysroot.go @@ -58,7 +58,7 @@ import ( func init() { android.RegisterModuleType("ndk_headers", ndkHeadersFactory) - android.RegisterModuleType("ndk_library", ndkLibraryFactory) + android.RegisterModuleType("ndk_library", NdkLibraryFactory) android.RegisterModuleType("versioned_ndk_headers", versionedNdkHeadersFactory) android.RegisterModuleType("preprocessed_ndk_headers", preprocessedNdkHeadersFactory) android.RegisterSingletonType("ndk", NdkSingleton) diff --git a/cc/testing.go b/cc/testing.go index 18cc83f87..417ea4aa0 100644 --- a/cc/testing.go +++ b/cc/testing.go @@ -265,6 +265,7 @@ func CreateTestContext(bp string, fs map[string][]byte, ctx.RegisterModuleType("toolchain_library", ToolchainLibraryFactory) ctx.RegisterModuleType("llndk_library", LlndkLibraryFactory) ctx.RegisterModuleType("llndk_headers", llndkHeadersFactory) + ctx.RegisterModuleType("ndk_library", NdkLibraryFactory) ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory) ctx.RegisterModuleType("cc_object", ObjectFactory) ctx.RegisterModuleType("filegroup", android.FileGroupFactory)