Merge "Compare tidy_disabled_srcs list by string values"

This commit is contained in:
Treehugger Robot
2022-02-16 03:02:37 +00:00
committed by Gerrit Code Review

View File

@@ -464,12 +464,12 @@ func transformSourceToObj(ctx ModuleContext, subdir string, srcFiles, noTidySrcs
// Source files are one-to-one with tidy, coverage, or kythe files, if enabled. // Source files are one-to-one with tidy, coverage, or kythe files, if enabled.
objFiles := make(android.Paths, len(srcFiles)) objFiles := make(android.Paths, len(srcFiles))
var tidyFiles android.Paths var tidyFiles android.Paths
noTidySrcsMap := make(map[android.Path]bool) noTidySrcsMap := make(map[string]bool)
var tidyVars string var tidyVars string
if flags.tidy { if flags.tidy {
tidyFiles = make(android.Paths, 0, len(srcFiles)) tidyFiles = make(android.Paths, 0, len(srcFiles))
for _, path := range noTidySrcs { for _, path := range noTidySrcs {
noTidySrcsMap[path] = true noTidySrcsMap[path.String()] = true
} }
tidyTimeout := ctx.Config().Getenv("TIDY_TIMEOUT") tidyTimeout := ctx.Config().Getenv("TIDY_TIMEOUT")
if len(tidyTimeout) > 0 { if len(tidyTimeout) > 0 {
@@ -675,7 +675,7 @@ func transformSourceToObj(ctx ModuleContext, subdir string, srcFiles, noTidySrcs
} }
// Even with tidy, some src file could be skipped by noTidySrcsMap. // Even with tidy, some src file could be skipped by noTidySrcsMap.
if tidy && !noTidySrcsMap[srcFile] { if tidy && !noTidySrcsMap[srcFile.String()] {
tidyFile := android.ObjPathWithExt(ctx, subdir, srcFile, "tidy") tidyFile := android.ObjPathWithExt(ctx, subdir, srcFile, "tidy")
tidyDepFile := android.ObjPathWithExt(ctx, subdir, srcFile, "tidy.dep") tidyDepFile := android.ObjPathWithExt(ctx, subdir, srcFile, "tidy.dep")
tidyFiles = append(tidyFiles, tidyFile) tidyFiles = append(tidyFiles, tidyFile)