Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
Replace rust.LibraryMutator and rust.LibstdMutator with
TransitionMutators.
Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Test: no change to build.ninja
Change-Id: Ia24a582119d39889279d7b93bac9259685153619
diff --git a/rust/testing.go b/rust/testing.go
index 6ee49a9..32cc823 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -200,15 +200,8 @@
ctx.RegisterModuleType("rust_prebuilt_library", PrebuiltLibraryFactory)
ctx.RegisterModuleType("rust_prebuilt_dylib", PrebuiltDylibFactory)
ctx.RegisterModuleType("rust_prebuilt_rlib", PrebuiltRlibFactory)
- ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
- // rust mutators
- ctx.BottomUp("rust_libraries", LibraryMutator).Parallel()
- ctx.BottomUp("rust_stdlinkage", LibstdMutator).Parallel()
- ctx.BottomUp("rust_begin", BeginMutator).Parallel()
- })
+ ctx.PreDepsMutators(registerPreDepsMutators)
ctx.RegisterParallelSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
ctx.RegisterParallelSingletonType("kythe_rust_extract", kytheExtractRustFactory)
- ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
- ctx.BottomUp("rust_sanitizers", rustSanitizerRuntimeMutator).Parallel()
- })
+ ctx.PostDepsMutators(registerPostDepsMutators)
}