diff options
Diffstat (limited to 'rust/binary.go')
-rw-r--r-- | rust/binary.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/rust/binary.go b/rust/binary.go index 860dc948a..5e7e922cf 100644 --- a/rust/binary.go +++ b/rust/binary.go @@ -137,12 +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} - var crateRootPath android.Path - if binary.baseCompiler.Properties.Crate_root == nil { - crateRootPath, _ = srcPathFromModuleSrcs(ctx, binary.baseCompiler.Properties.Srcs) - } else { - crateRootPath = android.PathForModuleSrc(ctx, *binary.baseCompiler.Properties.Crate_root) - } + crateRootPath := crateRootPath(ctx, binary) flags.RustFlags = append(flags.RustFlags, deps.depFlags...) flags.LinkFlags = append(flags.LinkFlags, deps.depLinkFlags...) |