[Rust] Correct the gcov path prefix.
strings.TrimPrefix() args are reversed, leading to an incorrect gcov path prefix for Rust coverage. Bug: 156482307 Test: built and ran unicode-xid_device_tests_unicode_xid with coverage Change-Id: I6476cee14093a7e53738019c84dbcf4333b0b9b2
This commit is contained in:
@@ -163,7 +163,7 @@ func transformSrctoCrate(ctx android.ModuleContext, main android.Path, deps Path
|
||||
if flags.Coverage {
|
||||
var gcnoFile android.WritablePath
|
||||
// Provide consistency with cc gcda output, see cc/builder.go init()
|
||||
profileEmitArg := strings.TrimPrefix("PWD=", cc.PwdPrefix()) + "/"
|
||||
profileEmitArg := strings.TrimPrefix(cc.PwdPrefix(), "PWD=") + "/"
|
||||
|
||||
if outputFile.Ext() != "" {
|
||||
gcnoFile = android.PathForModuleOut(ctx, pathtools.ReplaceExtension(outputFile.Base(), "gcno"))
|
||||
|
||||
Reference in New Issue
Block a user