diff options
author | 2021-01-14 16:03:18 -0800 | |
---|---|---|
committer | 2021-01-15 19:44:07 +0000 | |
commit | fa049385b89273f8c0ab3cd76e5ff3724265ec6c (patch) | |
tree | 0d5449d0fbef8dc3679b588d5609b0c1986dc92b /rust/rust.go | |
parent | 66f7fdd1c89ad5d0eab631143902f6ee17de6332 (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/rust.go')
-rw-r--r-- | rust/rust.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/rust/rust.go b/rust/rust.go index 1fa97af96..a2d029230 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -283,8 +283,6 @@ type PathDeps struct { depGeneratedHeaders android.Paths depSystemIncludePaths android.Paths - coverageFiles android.Paths - CrtBegin android.OptionalPath CrtEnd android.OptionalPath @@ -506,15 +504,7 @@ func (mod *Module) OutputFile() android.OptionalPath { func (mod *Module) CoverageFiles() android.Paths { if mod.compiler != nil { - if !mod.compiler.nativeCoverage() { - return android.Paths{} - } - if library, ok := mod.compiler.(*libraryDecorator); ok { - if library.coverageFile != nil { - return android.Paths{library.coverageFile} - } - return android.Paths{} - } + return android.Paths{} } panic(fmt.Errorf("CoverageFiles called on non-library module: %q", mod.BaseModuleName())) } @@ -817,7 +807,6 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { ctx.ModuleErrorf("mod %q not an rlib library", depName+rustDep.Properties.SubName) return } - depPaths.coverageFiles = append(depPaths.coverageFiles, rustDep.CoverageFiles()...) directRlibDeps = append(directRlibDeps, rustDep) mod.Properties.AndroidMkRlibs = append(mod.Properties.AndroidMkRlibs, depName+rustDep.Properties.SubName) case procMacroDepTag: @@ -893,7 +882,6 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { depPaths.depSystemIncludePaths = append(depPaths.depSystemIncludePaths, exportedInfo.SystemIncludeDirs...) depPaths.depClangFlags = append(depPaths.depClangFlags, exportedInfo.Flags...) depPaths.depGeneratedHeaders = append(depPaths.depGeneratedHeaders, exportedInfo.GeneratedHeaders...) - depPaths.coverageFiles = append(depPaths.coverageFiles, ccDep.CoverageFiles()...) directStaticLibDeps = append(directStaticLibDeps, ccDep) mod.Properties.AndroidMkStaticLibs = append(mod.Properties.AndroidMkStaticLibs, depName) case cc.IsSharedDepTag(depTag): |