Parallelize singleton execution
Bug: 281536768 Test: manual, presubmits Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
This commit is contained in:
2
cc/cc.go
2
cc/cc.go
@@ -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.
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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.
|
||||
|
14
cc/vndk.go
14
cc/vndk.go
@@ -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 {
|
||||
|
Reference in New Issue
Block a user