diff options
author | 2023-11-20 23:33:28 +0000 | |
---|---|---|
committer | 2023-11-22 00:52:14 +0000 | |
commit | a28404a7b09d3fe7126f1a5863283888377885b0 (patch) | |
tree | 7181a7a42a7ca73853175d0c9de82ea179bd5049 /rust/binary.go | |
parent | 1d8e20d744bae14ab3814125e6d9ac28b9fc97e3 (diff) |
rust: Cache crateRootPath to avoid ctx
This makes it possible to call crateRootPath in situations where a
ModuleContext is unavailable.
Test: m nothing
Bug: 309943184
Change-Id: Iee20b0606954a18ca516cdac40917d0016f94a05
Diffstat (limited to 'rust/binary.go')
-rw-r--r-- | rust/binary.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/binary.go b/rust/binary.go index 146c683fb..5e7e922cf 100644 --- a/rust/binary.go +++ b/rust/binary.go @@ -137,7 +137,7 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path fileName := binary.getStem(ctx) + ctx.toolchain().ExecutableSuffix() outputFile := android.PathForModuleOut(ctx, fileName) ret := buildOutput{outputFile: outputFile} - crateRootPath := binary.crateRootPath(ctx) + crateRootPath := crateRootPath(ctx, binary) flags.RustFlags = append(flags.RustFlags, deps.depFlags...) flags.LinkFlags = append(flags.LinkFlags, deps.depLinkFlags...) |