summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author LaMont Jones <lamontjones@google.com> 2023-05-16 00:58:37 +0000
committer LaMont Jones <lamontjones@google.com> 2023-05-19 20:31:32 +0000
commit0c10e4dcc027e341655e8eedc20bd77f9539a22b (patch)
tree84843d33683b21c94e695d2251b1fe20c58cb4fb
parente59c0db5360b850b444c3bed9b92b0fd30b15e1e (diff)
Parallelize singleton execution
Bug: 281536768 Test: manual, presubmits Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
-rw-r--r--android/androidmk.go2
-rw-r--r--android/api_levels.go2
-rw-r--r--android/buildinfo_prop.go2
-rw-r--r--android/gen_notice.go2
-rw-r--r--android/metrics.go2
-rw-r--r--android/module.go2
-rw-r--r--android/register.go2
-rw-r--r--android/test_suites.go2
-rw-r--r--apex/apex_singleton.go2
-rw-r--r--apex/key.go2
-rw-r--r--bloaty/bloaty.go2
-rw-r--r--cc/cc.go2
-rw-r--r--cc/ccdeps.go2
-rw-r--r--cc/cmakelists.go2
-rw-r--r--cc/compdb.go2
-rw-r--r--cc/fuzz.go2
-rw-r--r--cc/ndk_abi.go4
-rw-r--r--cc/ndk_sysroot.go2
-rw-r--r--cc/stub_library.go2
-rw-r--r--cc/tidy.go2
-rw-r--r--cc/vndk.go14
-rw-r--r--dexpreopt/config.go2
-rw-r--r--java/dexpreopt_bootjars.go2
-rw-r--r--java/dexpreopt_check.go2
-rw-r--r--java/fuzz.go2
-rw-r--r--java/hiddenapi_singleton.go2
-rw-r--r--java/java.go4
-rw-r--r--java/jdeps.go2
-rw-r--r--java/lint.go2
-rw-r--r--java/platform_bootclasspath.go2
-rw-r--r--java/platform_compat_config.go2
-rw-r--r--java/sdk.go2
-rw-r--r--multitree/metadata.go2
-rw-r--r--provenance/provenance_singleton.go2
-rw-r--r--rust/doc.go2
-rw-r--r--rust/project_json.go2
-rw-r--r--rust/rust.go2
-rw-r--r--rust/testing.go4
-rw-r--r--snapshot/host_fake_snapshot.go2
-rw-r--r--snapshot/recovery_snapshot.go2
-rw-r--r--snapshot/vendor_snapshot.go4
41 files changed, 51 insertions, 51 deletions
diff --git a/android/androidmk.go b/android/androidmk.go
index aa411d116..62f82f247 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -42,7 +42,7 @@ func init() {
}
func RegisterAndroidMkBuildComponents(ctx RegistrationContext) {
- ctx.RegisterSingletonType("androidmk", AndroidMkSingleton)
+ ctx.RegisterParallelSingletonType("androidmk", AndroidMkSingleton)
}
// Enable androidmk support.
diff --git a/android/api_levels.go b/android/api_levels.go
index fa919fda7..2391e6cc2 100644
--- a/android/api_levels.go
+++ b/android/api_levels.go
@@ -22,7 +22,7 @@ import (
)
func init() {
- RegisterSingletonType("api_levels", ApiLevelsSingleton)
+ RegisterParallelSingletonType("api_levels", ApiLevelsSingleton)
}
const previewAPILevelBase = 9000
diff --git a/android/buildinfo_prop.go b/android/buildinfo_prop.go
index 46f648802..8e19ad5f4 100644
--- a/android/buildinfo_prop.go
+++ b/android/buildinfo_prop.go
@@ -23,7 +23,7 @@ import (
func init() {
ctx := InitRegistrationContext
- ctx.RegisterSingletonModuleType("buildinfo_prop", buildinfoPropFactory)
+ ctx.RegisterParallelSingletonModuleType("buildinfo_prop", buildinfoPropFactory)
}
type buildinfoPropProperties struct {
diff --git a/android/gen_notice.go b/android/gen_notice.go
index 091345b9f..1acc638e8 100644
--- a/android/gen_notice.go
+++ b/android/gen_notice.go
@@ -28,7 +28,7 @@ func init() {
// Register the gen_notice module type.
func RegisterGenNoticeBuildComponents(ctx RegistrationContext) {
- ctx.RegisterSingletonType("gen_notice_build_rules", GenNoticeBuildRulesFactory)
+ ctx.RegisterParallelSingletonType("gen_notice_build_rules", GenNoticeBuildRulesFactory)
ctx.RegisterModuleType("gen_notice", GenNoticeFactory)
}
diff --git a/android/metrics.go b/android/metrics.go
index 3d41a1d6c..63c72cd97 100644
--- a/android/metrics.go
+++ b/android/metrics.go
@@ -42,7 +42,7 @@ func readSoongMetrics(config Config) (SoongMetrics, bool) {
}
func init() {
- RegisterSingletonType("soong_metrics", soongMetricsSingletonFactory)
+ RegisterParallelSingletonType("soong_metrics", soongMetricsSingletonFactory)
}
func soongMetricsSingletonFactory() Singleton { return soongMetricsSingleton{} }
diff --git a/android/module.go b/android/module.go
index db602a0aa..9024896e5 100644
--- a/android/module.go
+++ b/android/module.go
@@ -3724,7 +3724,7 @@ func (m *moduleContext) TargetRequiredModuleNames() []string {
}
func init() {
- RegisterSingletonType("buildtarget", BuildTargetSingleton)
+ RegisterParallelSingletonType("buildtarget", BuildTargetSingleton)
}
func BuildTargetSingleton() Singleton {
diff --git a/android/register.go b/android/register.go
index c57964c18..64b0207e7 100644
--- a/android/register.go
+++ b/android/register.go
@@ -231,7 +231,7 @@ func (ctx *Context) registerSingletonMakeVarsProvider(makevars SingletonMakeVars
func collateGloballyRegisteredSingletons() sortableComponents {
allSingletons := append(sortableComponents(nil), singletons...)
allSingletons = append(allSingletons,
- singleton{pre: false, parallel: false, name: "bazeldeps", factory: BazelSingleton},
+ singleton{pre: false, parallel: true, name: "bazeldeps", factory: BazelSingleton},
// Register phony just before makevars so it can write out its phony rules as Make rules
singleton{pre: false, parallel: false, name: "phony", factory: phonySingletonFactory},
diff --git a/android/test_suites.go b/android/test_suites.go
index b570b2383..b48d71af6 100644
--- a/android/test_suites.go
+++ b/android/test_suites.go
@@ -15,7 +15,7 @@
package android
func init() {
- RegisterSingletonType("testsuites", testSuiteFilesFactory)
+ RegisterParallelSingletonType("testsuites", testSuiteFilesFactory)
}
func testSuiteFilesFactory() Singleton {
diff --git a/apex/apex_singleton.go b/apex/apex_singleton.go
index ebc35cf5c..a63344fc1 100644
--- a/apex/apex_singleton.go
+++ b/apex/apex_singleton.go
@@ -27,7 +27,7 @@ func init() {
}
func registerApexDepsInfoComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("apex_depsinfo_singleton", apexDepsInfoSingletonFactory)
+ ctx.RegisterParallelSingletonType("apex_depsinfo_singleton", apexDepsInfoSingletonFactory)
}
type apexDepsInfoSingleton struct {
diff --git a/apex/key.go b/apex/key.go
index 0a7e80f8f..3010d76be 100644
--- a/apex/key.go
+++ b/apex/key.go
@@ -33,7 +33,7 @@ func init() {
func registerApexKeyBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("apex_key", ApexKeyFactory)
- ctx.RegisterSingletonType("apex_keys_text", apexKeysTextFactory)
+ ctx.RegisterParallelSingletonType("apex_keys_text", apexKeysTextFactory)
}
type apexKey struct {
diff --git a/bloaty/bloaty.go b/bloaty/bloaty.go
index 50f241f44..3cff60fe6 100644
--- a/bloaty/bloaty.go
+++ b/bloaty/bloaty.go
@@ -51,7 +51,7 @@ func init() {
pctx.VariableConfigMethod("hostPrebuiltTag", android.Config.PrebuiltOS)
pctx.SourcePathVariable("bloaty", "prebuilts/build-tools/${hostPrebuiltTag}/bin/bloaty")
pctx.HostBinToolVariable("bloatyMerger", "bloaty_merger")
- android.RegisterSingletonType("file_metrics", fileSizesSingleton)
+ android.RegisterParallelSingletonType("file_metrics", fileSizesSingleton)
fileSizeMeasurerKey = blueprint.NewProvider(measuredFiles{})
}
diff --git a/cc/cc.go b/cc/cc.go
index f4b565550..0e7f6c8d5 100644
--- a/cc/cc.go
+++ b/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.
diff --git a/cc/ccdeps.go b/cc/ccdeps.go
index 75e1faf0b..d30abbab7 100644
--- a/cc/ccdeps.go
+++ b/cc/ccdeps.go
@@ -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 {
diff --git a/cc/cmakelists.go b/cc/cmakelists.go
index ad130baaa..0f3f02da5 100644
--- a/cc/cmakelists.go
+++ b/cc/cmakelists.go
@@ -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 {
diff --git a/cc/compdb.go b/cc/compdb.go
index ea124438e..617be1a19 100644
--- a/cc/compdb.go
+++ b/cc/compdb.go
@@ -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 {
diff --git a/cc/fuzz.go b/cc/fuzz.go
index dfefc11f2..f55fd5cbc 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -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 {
diff --git a/cc/ndk_abi.go b/cc/ndk_abi.go
index 3456c32bb..86166dcbb 100644
--- a/cc/ndk_abi.go
+++ b/cc/ndk_abi.go
@@ -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 {
diff --git a/cc/ndk_sysroot.go b/cc/ndk_sysroot.go
index dffc6c614..0cf21b65a 100644
--- a/cc/ndk_sysroot.go
+++ b/cc/ndk_sysroot.go
@@ -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 {
diff --git a/cc/stub_library.go b/cc/stub_library.go
index f324dcc9b..3a6d0aeaa 100644
--- a/cc/stub_library.go
+++ b/cc/stub_library.go
@@ -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 {
diff --git a/cc/tidy.go b/cc/tidy.go
index bbcaece24..7b123cb57 100644
--- a/cc/tidy.go
+++ b/cc/tidy.go
@@ -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.
diff --git a/cc/vndk.go b/cc/vndk.go
index 9b70004c5..7a2286eb1 100644
--- a/cc/vndk.go
+++ b/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 {
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 0cc3bd63b..e61ebe624 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -197,7 +197,7 @@ var pctx = android.NewPackageContext("android/soong/dexpreopt")
func init() {
pctx.Import("android/soong/android")
- android.RegisterSingletonType("dexpreopt-soong-config", func() android.Singleton {
+ android.RegisterParallelSingletonType("dexpreopt-soong-config", func() android.Singleton {
return &globalSoongConfigSingleton{}
})
}
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index f477f404e..116c833e0 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -465,7 +465,7 @@ func dexpreoptBootJarsFactory() android.SingletonModule {
}
func RegisterDexpreoptBootJarsComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonModuleType("dex_bootjars", dexpreoptBootJarsFactory)
+ ctx.RegisterParallelSingletonModuleType("dex_bootjars", dexpreoptBootJarsFactory)
}
func SkipDexpreoptBootJars(ctx android.PathContext) bool {
diff --git a/java/dexpreopt_check.go b/java/dexpreopt_check.go
index 83c088cd4..7499481de 100644
--- a/java/dexpreopt_check.go
+++ b/java/dexpreopt_check.go
@@ -28,7 +28,7 @@ func init() {
}
func RegisterDexpreoptCheckBuildComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonModuleType("dexpreopt_systemserver_check", dexpreoptSystemserverCheckFactory)
+ ctx.RegisterParallelSingletonModuleType("dexpreopt_systemserver_check", dexpreoptSystemserverCheckFactory)
}
// A build-time check to verify if all compilation artifacts of system server jars are installed
diff --git a/java/fuzz.go b/java/fuzz.go
index 4aa6dbffd..e44669bce 100644
--- a/java/fuzz.go
+++ b/java/fuzz.go
@@ -38,7 +38,7 @@ func init() {
func RegisterJavaFuzzBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("java_fuzz", JavaFuzzFactory)
- ctx.RegisterSingletonType("java_fuzz_packaging", javaFuzzPackagingFactory)
+ ctx.RegisterParallelSingletonType("java_fuzz_packaging", javaFuzzPackagingFactory)
}
type JavaFuzzTest struct {
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go
index 52934a327..d4ee4fc9f 100644
--- a/java/hiddenapi_singleton.go
+++ b/java/hiddenapi_singleton.go
@@ -25,7 +25,7 @@ func init() {
}
func RegisterHiddenApiSingletonComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
+ ctx.RegisterParallelSingletonType("hiddenapi", hiddenAPISingletonFactory)
}
var PrepareForTestWithHiddenApiBuildComponents = android.FixtureRegisterWithContext(RegisterHiddenApiSingletonComponents)
diff --git a/java/java.go b/java/java.go
index bb8fe62aa..33846bec6 100644
--- a/java/java.go
+++ b/java/java.go
@@ -73,8 +73,8 @@ func registerJavaBuildComponents(ctx android.RegistrationContext) {
ctx.BottomUp("jacoco_deps", jacocoDepsMutator).Parallel()
})
- ctx.RegisterSingletonType("logtags", LogtagsSingleton)
- ctx.RegisterSingletonType("kythe_java_extract", kytheExtractJavaFactory)
+ ctx.RegisterParallelSingletonType("logtags", LogtagsSingleton)
+ ctx.RegisterParallelSingletonType("kythe_java_extract", kytheExtractJavaFactory)
}
func RegisterJavaSdkMemberTypes() {
diff --git a/java/jdeps.go b/java/jdeps.go
index a52b86708..4c8c11c5d 100644
--- a/java/jdeps.go
+++ b/java/jdeps.go
@@ -26,7 +26,7 @@ import (
// called. Dependency info file is generated in $OUT/module_bp_java_depend.json.
func init() {
- android.RegisterSingletonType("jdeps_generator", jDepsGeneratorSingleton)
+ android.RegisterParallelSingletonType("jdeps_generator", jDepsGeneratorSingleton)
}
func jDepsGeneratorSingleton() android.Singleton {
diff --git a/java/lint.go b/java/lint.go
index 40ef48416..a0f99707a 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -705,7 +705,7 @@ func (l *lintSingleton) MakeVars(ctx android.MakeVarsContext) {
var _ android.SingletonMakeVarsProvider = (*lintSingleton)(nil)
func init() {
- android.RegisterSingletonType("lint",
+ android.RegisterParallelSingletonType("lint",
func() android.Singleton { return &lintSingleton{} })
registerLintBuildComponents(android.InitRegistrationContext)
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go
index 07fb92cfe..0d4db7ca1 100644
--- a/java/platform_bootclasspath.go
+++ b/java/platform_bootclasspath.go
@@ -26,7 +26,7 @@ func init() {
}
func registerPlatformBootclasspathBuildComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
+ ctx.RegisterParallelSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
}
// The tags used for the dependencies between the platform bootclasspath and any configured boot
diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go
index d41729150..2197304a5 100644
--- a/java/platform_compat_config.go
+++ b/java/platform_compat_config.go
@@ -36,7 +36,7 @@ var CompatConfigSdkMemberType = &compatConfigMemberType{
}
func registerPlatformCompatConfigBuildComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("platform_compat_config_singleton", platformCompatConfigSingletonFactory)
+ ctx.RegisterParallelSingletonType("platform_compat_config_singleton", platformCompatConfigSingletonFactory)
ctx.RegisterModuleType("platform_compat_config", PlatformCompatConfigFactory)
ctx.RegisterModuleType("prebuilt_platform_compat_config", prebuiltCompatConfigFactory)
ctx.RegisterModuleType("global_compat_config", globalCompatConfigFactory)
diff --git a/java/sdk.go b/java/sdk.go
index 8b4918add..7fa604fdb 100644
--- a/java/sdk.go
+++ b/java/sdk.go
@@ -28,7 +28,7 @@ import (
func init() {
android.RegisterPreSingletonType("sdk_versions", sdkPreSingletonFactory)
- android.RegisterSingletonType("sdk", sdkSingletonFactory)
+ android.RegisterParallelSingletonType("sdk", sdkSingletonFactory)
android.RegisterMakeVarsProvider(pctx, sdkMakeVars)
}
diff --git a/multitree/metadata.go b/multitree/metadata.go
index 3fd721599..0eb0efc95 100644
--- a/multitree/metadata.go
+++ b/multitree/metadata.go
@@ -20,7 +20,7 @@ import (
)
func init() {
- android.RegisterSingletonType("update-meta", UpdateMetaSingleton)
+ android.RegisterParallelSingletonType("update-meta", UpdateMetaSingleton)
}
func UpdateMetaSingleton() android.Singleton {
diff --git a/provenance/provenance_singleton.go b/provenance/provenance_singleton.go
index fbb6212ff..5d27c0cf4 100644
--- a/provenance/provenance_singleton.go
+++ b/provenance/provenance_singleton.go
@@ -51,7 +51,7 @@ func init() {
}
func RegisterProvenanceSingleton(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("provenance_metadata_singleton", provenanceInfoSingletonFactory)
+ ctx.RegisterParallelSingletonType("provenance_metadata_singleton", provenanceInfoSingletonFactory)
}
var PrepareForTestWithProvenanceSingleton = android.FixtureRegisterWithContext(RegisterProvenanceSingleton)
diff --git a/rust/doc.go b/rust/doc.go
index fe3581b42..6970d7979 100644
--- a/rust/doc.go
+++ b/rust/doc.go
@@ -19,7 +19,7 @@ import (
)
func init() {
- android.RegisterSingletonType("rustdoc", RustdocSingleton)
+ android.RegisterParallelSingletonType("rustdoc", RustdocSingleton)
}
func RustdocSingleton() android.Singleton {
diff --git a/rust/project_json.go b/rust/project_json.go
index fe259d6c2..40aa7c736 100644
--- a/rust/project_json.go
+++ b/rust/project_json.go
@@ -74,7 +74,7 @@ func rustProjectGeneratorSingleton() android.Singleton {
}
func init() {
- android.RegisterSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
+ android.RegisterParallelSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
}
// sourceProviderVariantSource returns the path to the source file if this
diff --git a/rust/rust.go b/rust/rust.go
index dc53cc028..4324ecbb9 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -45,7 +45,7 @@ func init() {
})
pctx.Import("android/soong/rust/config")
pctx.ImportAs("cc_config", "android/soong/cc/config")
- android.InitRegistrationContext.RegisterSingletonType("kythe_rust_extract", kytheExtractRustFactory)
+ android.InitRegistrationContext.RegisterParallelSingletonType("kythe_rust_extract", kytheExtractRustFactory)
}
type Flags struct {
diff --git a/rust/testing.go b/rust/testing.go
index 0a6a870d8..7f3056954 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -200,8 +200,8 @@ func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
ctx.BottomUp("rust_stdlinkage", LibstdMutator).Parallel()
ctx.BottomUp("rust_begin", BeginMutator).Parallel()
})
- ctx.RegisterSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
- ctx.RegisterSingletonType("kythe_rust_extract", kytheExtractRustFactory)
+ ctx.RegisterParallelSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
+ ctx.RegisterParallelSingletonType("kythe_rust_extract", kytheExtractRustFactory)
ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.BottomUp("rust_sanitizers", rustSanitizerRuntimeMutator).Parallel()
})
diff --git a/snapshot/host_fake_snapshot.go b/snapshot/host_fake_snapshot.go
index b04657d3d..c4cfbb5ce 100644
--- a/snapshot/host_fake_snapshot.go
+++ b/snapshot/host_fake_snapshot.go
@@ -75,7 +75,7 @@ type hostSnapshotFakeJsonFlags struct {
}
func registerHostSnapshotComponents(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("host-fake-snapshot", HostToolsFakeAndroidSingleton)
+ ctx.RegisterParallelSingletonType("host-fake-snapshot", HostToolsFakeAndroidSingleton)
}
type hostFakeSingleton struct {
diff --git a/snapshot/recovery_snapshot.go b/snapshot/recovery_snapshot.go
index ac002be9c..8ff59cbcf 100644
--- a/snapshot/recovery_snapshot.go
+++ b/snapshot/recovery_snapshot.go
@@ -68,7 +68,7 @@ var RecoverySnapshotImageName = "recovery"
type RecoverySnapshotImage struct{}
func (RecoverySnapshotImage) Init(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("recovery-snapshot", RecoverySnapshotSingleton)
+ ctx.RegisterParallelSingletonType("recovery-snapshot", RecoverySnapshotSingleton)
}
func (RecoverySnapshotImage) RegisterAdditionalModule(ctx android.RegistrationContext, name string, factory android.ModuleFactory) {
diff --git a/snapshot/vendor_snapshot.go b/snapshot/vendor_snapshot.go
index 8f7b8c215..4484c855d 100644
--- a/snapshot/vendor_snapshot.go
+++ b/snapshot/vendor_snapshot.go
@@ -78,8 +78,8 @@ var VendorSnapshotImageName = "vendor"
type VendorSnapshotImage struct{}
func (VendorSnapshotImage) Init(ctx android.RegistrationContext) {
- ctx.RegisterSingletonType("vendor-snapshot", VendorSnapshotSingleton)
- ctx.RegisterSingletonType("vendor-fake-snapshot", VendorFakeSnapshotSingleton)
+ ctx.RegisterParallelSingletonType("vendor-snapshot", VendorSnapshotSingleton)
+ ctx.RegisterParallelSingletonType("vendor-fake-snapshot", VendorFakeSnapshotSingleton)
}
func (VendorSnapshotImage) RegisterAdditionalModule(ctx android.RegistrationContext, name string, factory android.ModuleFactory) {