summaryrefslogtreecommitdiff
path: root/rust/builder.go
diff options
context:
space:
mode:
author Matthew Maurer <mmaurer@google.com> 2023-11-20 17:52:01 +0000
committer Matthew Maurer <mmaurer@google.com> 2023-11-20 20:25:27 +0000
commitcd41653b96d2285b11b010198e453cf688b66cbe (patch)
treee3b824fceb20ab965fee478698583c76c6671153 /rust/builder.go
parent689d6f63e4cf97b30385f357dd2165207f51d0c0 (diff)
rust: Privatize Cargo* methods on compiler
These methods aren't used outside, and probably shouldn't be. Bug: 309943184 Test: m nothing Change-Id: Ia7dd5220ccd10c0136aa16f5e21149eaf7a03ea1
Diffstat (limited to 'rust/builder.go')
-rw-r--r--rust/builder.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/builder.go b/rust/builder.go
index 162d1aab0..c855cfbd2 100644
--- a/rust/builder.go
+++ b/rust/builder.go
@@ -196,7 +196,7 @@ func rustEnvVars(ctx ModuleContext, deps PathDeps) []string {
}
if len(deps.SrcDeps) > 0 {
- moduleGenDir := ctx.RustModule().compiler.CargoOutDir()
+ moduleGenDir := ctx.RustModule().compiler.cargoOutDir()
// We must calculate an absolute path for OUT_DIR since Rust's include! macro (which normally consumes this)
// assumes that paths are relative to the source file.
var outDirPrefix string
@@ -215,13 +215,13 @@ func rustEnvVars(ctx ModuleContext, deps PathDeps) []string {
envVars = append(envVars, "ANDROID_RUST_VERSION="+config.GetRustVersion(ctx))
- if ctx.RustModule().compiler.CargoEnvCompat() {
+ if ctx.RustModule().compiler.cargoEnvCompat() {
if bin, ok := ctx.RustModule().compiler.(*binaryDecorator); ok {
envVars = append(envVars, "CARGO_BIN_NAME="+bin.getStem(ctx))
}
envVars = append(envVars, "CARGO_CRATE_NAME="+ctx.RustModule().CrateName())
envVars = append(envVars, "CARGO_PKG_NAME="+ctx.RustModule().CrateName())
- pkgVersion := ctx.RustModule().compiler.CargoPkgVersion()
+ pkgVersion := ctx.RustModule().compiler.cargoPkgVersion()
if pkgVersion != "" {
envVars = append(envVars, "CARGO_PKG_VERSION="+pkgVersion)
@@ -327,7 +327,7 @@ func transformSrctoCrate(ctx ModuleContext, main android.Path, deps PathDeps, fl
orderOnly = append(orderOnly, deps.SharedLibs...)
if len(deps.SrcDeps) > 0 {
- moduleGenDir := ctx.RustModule().compiler.CargoOutDir()
+ moduleGenDir := ctx.RustModule().compiler.cargoOutDir()
var outputs android.WritablePaths
for _, genSrc := range deps.SrcDeps {