Merge "[rust/coverage] Use new flag for coverage instrumentation"
This commit is contained in:
@@ -56,7 +56,7 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags
|
||||
flags.Coverage = true
|
||||
coverage := ctx.GetDirectDepWithTag(CovLibraryName, cc.CoverageDepTag).(cc.LinkableInterface)
|
||||
flags.RustFlags = append(flags.RustFlags,
|
||||
"-Z instrument-coverage", "-g")
|
||||
"-C instrument-coverage", "-g")
|
||||
flags.LinkFlags = append(flags.LinkFlags,
|
||||
profileInstrFlag, "-g", coverage.OutputFile().Path().String(), "-Wl,--wrap,open")
|
||||
deps.StaticLibs = append(deps.StaticLibs, coverage.OutputFile().Path())
|
||||
|
@@ -56,7 +56,7 @@ func TestCoverageFlags(t *testing.T) {
|
||||
fizzCov := ctx.ModuleForTests("fizz_cov", "android_arm64_armv8-a_cov").Rule("rustc")
|
||||
buzzNoCov := ctx.ModuleForTests("buzzNoCov", "android_arm64_armv8-a").Rule("rustc")
|
||||
|
||||
rustcCoverageFlags := []string{"-Z instrument-coverage", " -g "}
|
||||
rustcCoverageFlags := []string{"-C instrument-coverage", " -g "}
|
||||
for _, flag := range rustcCoverageFlags {
|
||||
missingErrorStr := "missing rustc flag '%s' for '%s' module with coverage enabled; rustcFlags: %#v"
|
||||
containsErrorStr := "contains rustc flag '%s' for '%s' module with coverage disabled; rustcFlags: %#v"
|
||||
|
Reference in New Issue
Block a user