summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/binary.go')
-rw-r--r--rust/binary.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/rust/binary.go b/rust/binary.go
index 860dc948a..146c683fb 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 := binary.crateRootPath(ctx)
flags.RustFlags = append(flags.RustFlags, deps.depFlags...)
flags.LinkFlags = append(flags.LinkFlags, deps.depLinkFlags...)