summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-01-14 16:03:18 -0800
committerJoel Galenson <jgalenson@google.com>2021-01-15 19:44:07 +0000
commitfa049385b89273f8c0ab3cd76e5ff3724265ec6c (patch)
tree0d5449d0fbef8dc3679b588d5609b0c1986dc92b /rust/binary.go
parent66f7fdd1c89ad5d0eab631143902f6ee17de6332 (diff)
Migrate Rust to LLVM coverage.
Bug: 177675913 Test: Manually compile, run, and see output with llvm-cov. Change-Id: I66729cff87a848782e9fa1b95cbbc06318c5761a
Diffstat (limited to 'rust/binary.go')
-rw-r--r--rust/binary.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/rust/binary.go b/rust/binary.go
index ca07d07c1..2963a37af 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -121,7 +121,7 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path
flags.RustFlags = append(flags.RustFlags, deps.depFlags...)
flags.LinkFlags = append(flags.LinkFlags, deps.linkObjects...)
- outputs := TransformSrcToBinary(ctx, srcPath, deps, flags, outputFile, deps.linkDirs)
+ TransformSrcToBinary(ctx, srcPath, deps, flags, outputFile, deps.linkDirs)
if binary.stripper.NeedsStrip(ctx) {
strippedOutputFile := android.PathForModuleOut(ctx, "stripped", fileName)
@@ -129,24 +129,9 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path
binary.strippedOutputFile = android.OptionalPathForPath(strippedOutputFile)
}
- binary.coverageFile = outputs.coverageFile
-
- var coverageFiles android.Paths
- if outputs.coverageFile != nil {
- coverageFiles = append(coverageFiles, binary.coverageFile)
- }
- if len(deps.coverageFiles) > 0 {
- coverageFiles = append(coverageFiles, deps.coverageFiles...)
- }
- binary.coverageOutputZipFile = TransformCoverageFilesToZip(ctx, coverageFiles, binary.getStem(ctx))
-
return outputFile
}
-func (binary *binaryDecorator) coverageOutputZipPath() android.OptionalPath {
- return binary.coverageOutputZipFile
-}
-
func (binary *binaryDecorator) autoDep(ctx BaseModuleContext) autoDep {
// Binaries default to dylib dependencies for device, rlib for host.
if binary.preferRlib() {