summaryrefslogtreecommitdiff
path: root/rust/config/global.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/config/global.go')
-rw-r--r--rust/config/global.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/rust/config/global.go b/rust/config/global.go
index 0ddc11637..f397ce90d 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -126,27 +126,3 @@ func GetRustVersion(ctx android.PathContext) string {
func BazelRustToolchainVars(config android.Config) string {
return android.BazelToolchainVars(config, exportedVars)
}
-
-func RustPath(ctx android.PathContext, file string) android.SourcePath {
- type rustToolKey string
- key := android.NewCustomOnceKey(rustToolKey(file))
- return ctx.Config().OnceSourcePath(key, func() android.SourcePath {
- return rustPath(ctx).Join(ctx, file)
- })
-}
-
-var rustPathKey = android.NewOnceKey("clangPath")
-
-func rustPath(ctx android.PathContext) android.SourcePath {
- return ctx.Config().OnceSourcePath(rustPathKey, func() android.SourcePath {
- rustBase := RustDefaultBase
- if override := ctx.Config().Getenv("RUST_PREBUILTS_BASE"); override != "" {
- rustBase = override
- }
- rustVersion := RustDefaultVersion
- if override := ctx.Config().Getenv("RUST_DEFAULT_VERSION"); override != "" {
- rustVersion = override
- }
- return android.PathForSource(ctx, rustBase, ctx.Config().PrebuiltOS(), rustVersion)
- })
-}