From 5162ff14fc91db500e008a18840c3dfd4edc695a Mon Sep 17 00:00:00 2001 From: Sam Delmerico Date: Fri, 8 Sep 2023 16:10:47 +0000 Subject: Revert "add crate_root property to rust modules" Revert submission 2605644-rulebuilder-ninja-vars Reason for revert: b/299568218 Reverted changes: /q/submissionid:2605644-rulebuilder-ninja-vars Change-Id: I17645fcff117909c09a016157235805f0974340b --- rust/binary.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'rust/binary.go') diff --git a/rust/binary.go b/rust/binary.go index 2c9f64dd9..1e24bebab 100644 --- a/rust/binary.go +++ b/rust/binary.go @@ -137,14 +137,9 @@ func (binary *binaryDecorator) preferRlib() bool { func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) buildOutput { fileName := binary.getStem(ctx) + ctx.toolchain().ExecutableSuffix() + srcPath, _ := srcPathFromModuleSrcs(ctx, binary.baseCompiler.Properties.Srcs) 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) - } flags.RustFlags = append(flags.RustFlags, deps.depFlags...) flags.LinkFlags = append(flags.LinkFlags, deps.depLinkFlags...) @@ -159,7 +154,7 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path } binary.baseCompiler.unstrippedOutputFile = outputFile - ret.kytheFile = TransformSrcToBinary(ctx, crateRootPath, deps, flags, outputFile).kytheFile + ret.kytheFile = TransformSrcToBinary(ctx, srcPath, deps, flags, outputFile).kytheFile return ret } -- cgit v1.2.3-59-g8ed1b