summaryrefslogtreecommitdiff
path: root/rust/coverage.go
AgeCommit message (Collapse)Author
2021-01-15Migrate Rust to LLVM coverage.Joel Galenson
Bug: 177675913 Test: Manually compile, run, and see output with llvm-cov. Change-Id: I66729cff87a848782e9fa1b95cbbc06318c5761a
2020-08-25Migrate away from removed optionJoel Galenson
Upstream removed the -Z no-landing-pads option in https://github.com/rust-lang/rust/pull/70175, which we picked up in our latest toolchain update. Fixes: 166317885 Test: Build and TreeHugger Change-Id: I51c0ef671bf6a334b2b7223da42cab547e4407d3
2020-06-24Remove moduleContextImpl structThiƩbaud Weksteen
The moduleContextImpl structure contains duplicate information on the contexts. BaseModuleContext, ModuleContext and DepsContext can already surface which Module is being processed via Module(). Because most of the Rust-specific methods on the *Context structures simply forward to the Module methods, expose a RustModule() method. Test: cd external/rust/crates; mma Change-Id: Ifee90825d54081fc5e9a8df0b7c4580412e9158c
2020-06-22Make native_coverage clause work with ClangCoverageColin Cross
Make uses NATIVE_COVERAGE to enable gcov coverage and CLANG_COVERAGE to enable clang coverage. NATIVE_COVERAGE is translated to the Soong Native_coverage product variable which triggers the native_coverage clause in Android.bp files. The clause also needs to be triggered for CLANG_COVERAGE. Rename the existing Native_coverage product variable to GcovCoverage, and regenerate Native_coverage when either GcovCoverage or ClangCoverage are set. Also remove NativeLineCoverage, it wasn't doing anything differently than Native_coverage. Bug: 159059537 Test: m checkbuild Change-Id: I215124a9b35a2ad50ad562079d392e3d33da11f4
2020-05-05Add gcov coverage support to Rust modules.Ivan Lozano
This adds gcov coverage support for Rust device library and binary modules (including test modules). Support is provided to pass Rust static library gcno files to CC modules and visa versa. Additional changes: * Begin mutator added for Rust modules. * SuffixInList added to android package. * CoverageEnabled added to Coverage interface. * CoverageFiles added to LinkableLibrary interface. * Fix in coverage mutator for non-CC modules which marked the wrong variant as the coverage variant. * Added coverage libraries to the cc.GatherRequiredDepsForTest. Bug: 146448203 Test: NATIVE_COVERAGE=true COVERAGE_PATHS='*' m -j <rust_module> Change-Id: If20728bdde42a1dd544a35a40f0d981b80a5835f