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
This commit is contained in:
@@ -17,7 +17,7 @@ package android
|
||||
import "path/filepath"
|
||||
|
||||
func init() {
|
||||
RegisterModuleType("prebuilt_build_tool", prebuiltBuildToolFactory)
|
||||
RegisterModuleType("prebuilt_build_tool", NewPrebuiltBuildTool)
|
||||
}
|
||||
|
||||
type prebuiltBuildToolProperties struct {
|
||||
@@ -101,10 +101,6 @@ var _ HostToolProvider = &prebuiltBuildTool{}
|
||||
|
||||
// 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)
|
||||
|
Reference in New Issue
Block a user