Parallelize singleton execution

Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
This commit is contained in:
LaMont Jones
2023-05-16 00:58:37 +00:00
parent e59c0db536
commit 0c10e4dcc0
41 changed files with 51 additions and 51 deletions

View File

@@ -83,7 +83,7 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
ctx.TopDown("sabi_deps", sabiDepsMutator)
})
ctx.RegisterSingletonType("kythe_extract_all", kytheExtractAllFactory)
ctx.RegisterParallelSingletonType("kythe_extract_all", kytheExtractAllFactory)
}
// Deps is a struct containing module names of dependencies, separated by the kind of dependency.

View File

@@ -30,7 +30,7 @@ import (
// The info file is generated in $OUT/module_bp_cc_depend.json.
func init() {
android.RegisterSingletonType("ccdeps_generator", ccDepsGeneratorSingleton)
android.RegisterParallelSingletonType("ccdeps_generator", ccDepsGeneratorSingleton)
}
func ccDepsGeneratorSingleton() android.Singleton {

View File

@@ -29,7 +29,7 @@ import (
// structure (see variable CLionOutputProjectsDirectory for root).
func init() {
android.RegisterSingletonType("cmakelists_generator", cMakeListsGeneratorSingleton)
android.RegisterParallelSingletonType("cmakelists_generator", cMakeListsGeneratorSingleton)
}
func cMakeListsGeneratorSingleton() android.Singleton {

View File

@@ -32,7 +32,7 @@ import (
// make SOONG_GEN_COMPDB=1 nothing to get all targets.
func init() {
android.RegisterSingletonType("compdb_generator", compDBGeneratorSingleton)
android.RegisterParallelSingletonType("compdb_generator", compDBGeneratorSingleton)
}
func compDBGeneratorSingleton() android.Singleton {

View File

@@ -28,7 +28,7 @@ import (
func init() {
android.RegisterModuleType("cc_fuzz", LibFuzzFactory)
android.RegisterSingletonType("cc_fuzz_packaging", fuzzPackagingFactory)
android.RegisterParallelSingletonType("cc_fuzz_packaging", fuzzPackagingFactory)
}
type FuzzProperties struct {

View File

@@ -19,8 +19,8 @@ import (
)
func init() {
android.RegisterSingletonType("ndk_abi_dump", NdkAbiDumpSingleton)
android.RegisterSingletonType("ndk_abi_diff", NdkAbiDiffSingleton)
android.RegisterParallelSingletonType("ndk_abi_dump", NdkAbiDumpSingleton)
android.RegisterParallelSingletonType("ndk_abi_diff", NdkAbiDiffSingleton)
}
func getNdkAbiDumpInstallBase(ctx android.PathContext) android.OutputPath {

View File

@@ -66,7 +66,7 @@ func RegisterNdkModuleTypes(ctx android.RegistrationContext) {
ctx.RegisterModuleType("ndk_library", NdkLibraryFactory)
ctx.RegisterModuleType("versioned_ndk_headers", versionedNdkHeadersFactory)
ctx.RegisterModuleType("preprocessed_ndk_headers", preprocessedNdkHeadersFactory)
ctx.RegisterSingletonType("ndk", NdkSingleton)
ctx.RegisterParallelSingletonType("ndk", NdkSingleton)
}
func getNdkInstallBase(ctx android.PathContext) android.InstallPath {

View File

@@ -23,7 +23,7 @@ import (
func init() {
// Use singleton type to gather all generated soong modules.
android.RegisterSingletonType("stublibraries", stubLibrariesSingleton)
android.RegisterParallelSingletonType("stublibraries", stubLibrariesSingleton)
}
type stubLibraries struct {

View File

@@ -201,7 +201,7 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
}
func init() {
android.RegisterSingletonType("tidy_phony_targets", TidyPhonySingleton)
android.RegisterParallelSingletonType("tidy_phony_targets", TidyPhonySingleton)
}
// This TidyPhonySingleton generates both tidy-* and obj-* phony targets for C/C++ files.

View File

@@ -417,16 +417,16 @@ func VndkMutator(mctx android.BottomUpMutatorContext) {
func init() {
RegisterVndkLibraryTxtTypes(android.InitRegistrationContext)
android.RegisterSingletonType("vndk-snapshot", VndkSnapshotSingleton)
android.RegisterParallelSingletonType("vndk-snapshot", VndkSnapshotSingleton)
}
func RegisterVndkLibraryTxtTypes(ctx android.RegistrationContext) {
ctx.RegisterSingletonModuleType("llndk_libraries_txt", llndkLibrariesTxtFactory)
ctx.RegisterSingletonModuleType("vndksp_libraries_txt", vndkSPLibrariesTxtFactory)
ctx.RegisterSingletonModuleType("vndkcore_libraries_txt", vndkCoreLibrariesTxtFactory)
ctx.RegisterSingletonModuleType("vndkprivate_libraries_txt", vndkPrivateLibrariesTxtFactory)
ctx.RegisterSingletonModuleType("vndkproduct_libraries_txt", vndkProductLibrariesTxtFactory)
ctx.RegisterSingletonModuleType("vndkcorevariant_libraries_txt", vndkUsingCoreVariantLibrariesTxtFactory)
ctx.RegisterParallelSingletonModuleType("llndk_libraries_txt", llndkLibrariesTxtFactory)
ctx.RegisterParallelSingletonModuleType("vndksp_libraries_txt", vndkSPLibrariesTxtFactory)
ctx.RegisterParallelSingletonModuleType("vndkcore_libraries_txt", vndkCoreLibrariesTxtFactory)
ctx.RegisterParallelSingletonModuleType("vndkprivate_libraries_txt", vndkPrivateLibrariesTxtFactory)
ctx.RegisterParallelSingletonModuleType("vndkproduct_libraries_txt", vndkProductLibrariesTxtFactory)
ctx.RegisterParallelSingletonModuleType("vndkcorevariant_libraries_txt", vndkUsingCoreVariantLibrariesTxtFactory)
}
type vndkLibrariesTxt struct {