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

@@ -19,7 +19,7 @@ import (
)
func init() {
android.RegisterSingletonType("rustdoc", RustdocSingleton)
android.RegisterParallelSingletonType("rustdoc", RustdocSingleton)
}
func RustdocSingleton() android.Singleton {

View File

@@ -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

View File

@@ -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 {

View File

@@ -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()
})