summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2020-06-16 10:26:57 -0400
committerIvan Lozano <ivanlozano@google.com>2020-06-16 10:28:25 -0400
commit8a23fa48191b7accc14963ff1870c3e192467dbd (patch)
tree9ea0ff26cda97fcc686070c503e7f345483e493a /rust/binary.go
parent2752d926a9aa78f68c0713af6ecda11b5b02b583 (diff)
[Rust] Remove unused variables and deduplicate.
Bug: 158731826 Test: cd external/rust/crates; mma Change-Id: I8c9e5cfeaf941b9676b92451b227c15db9a41bbc
Diffstat (limited to 'rust/binary.go')
-rw-r--r--rust/binary.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/rust/binary.go b/rust/binary.go
index c25ae0969..56d6f0b53 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -24,9 +24,6 @@ func init() {
}
type BinaryCompilerProperties struct {
- // path to the main source file that contains the program entry point (e.g. src/main.rs)
- Srcs []string `android:"path,arch_variant"`
-
// passes -C prefer-dynamic to rustc, which tells it to dynamically link the stdlib
// (assuming it has no dylib dependencies already)
Prefer_dynamic *bool
@@ -35,10 +32,7 @@ type BinaryCompilerProperties struct {
type binaryDecorator struct {
*baseCompiler
- Properties BinaryCompilerProperties
- distFile android.OptionalPath
- coverageOutputZipFile android.OptionalPath
- unstrippedOutputFile android.Path
+ Properties BinaryCompilerProperties
}
var _ compiler = (*binaryDecorator)(nil)
@@ -112,7 +106,7 @@ func (binary *binaryDecorator) nativeCoverage() bool {
func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Path {
fileName := binary.getStem(ctx) + ctx.toolchain().ExecutableSuffix()
- srcPath := srcPathFromModuleSrcs(ctx, binary.Properties.Srcs)
+ srcPath := srcPathFromModuleSrcs(ctx, binary.baseCompiler.Properties.Srcs)
outputFile := android.PathForModuleOut(ctx, fileName)
binary.unstrippedOutputFile = outputFile