add rust_toolchain_rustc_prebuilt module type
Sandboxing the rust rules requires having explicit inputs for the rust
toolchain. This module type makes the rustc prebuilt and its
dependencies explicit as a module that can be depended on by all rust
rules.
Bug: 286077158
Test: rust sandboxing topic + go test
Change-Id: If2b80b32e329e6a6ee11ba824de868cf04714553
diff --git a/android/prebuilt_build_tool.go b/android/prebuilt_build_tool.go
index aeae20f..17b3230 100644
--- a/android/prebuilt_build_tool.go
+++ b/android/prebuilt_build_tool.go
@@ -17,7 +17,7 @@
import "path/filepath"
func init() {
- RegisterModuleType("prebuilt_build_tool", prebuiltBuildToolFactory)
+ RegisterModuleType("prebuilt_build_tool", NewPrebuiltBuildTool)
}
type prebuiltBuildToolProperties struct {
@@ -101,10 +101,6 @@
// prebuilt_build_tool is to declare prebuilts to be used during the build, particularly for use
// in genrules with the "tools" property.
-func prebuiltBuildToolFactory() Module {
- return NewPrebuiltBuildTool()
-}
-
func NewPrebuiltBuildTool() Module {
module := &prebuiltBuildTool{}
module.AddProperties(&module.properties)