diff options
author | 2023-11-22 20:37:27 +0000 | |
---|---|---|
committer | 2023-11-22 20:37:27 +0000 | |
commit | b103659c0b9e883401d482168731d194b2c6657c (patch) | |
tree | 9561013968ca2af25b30e9bf8dd1e4de5416912d /rust/builder.go | |
parent | f7474880a152b8423231b70d597c8a949ae2ab01 (diff) | |
parent | db72f7ed803df370951f7a03bd6f6fcad1b357e2 (diff) |
Merge changes I0caddbf6,Iee20b060,I6c92580b,I45028945,Ia7dd5220, ... into main
* changes:
rust: Resolve crate roots outside rust-project
rust: Cache crateRootPath to avoid ctx
rust: internalize srcPathFromModuleSrcs
rust: move crateRootPath to compiler
rust: Privatize Cargo* methods on compiler
rust: Move compiler interface to compiler.go
Diffstat (limited to 'rust/builder.go')
-rw-r--r-- | rust/builder.go | 8 |
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 { |