Skip to content

Commit

Permalink
Another attempt at the cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Jan 1, 2024
1 parent 0033ce6 commit 1e2552a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sources/SilkTouch/Clang/ResponseFileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,8 @@ out Dictionary<string, string> withPackings
fileDirectory,
clangCommandLineArgs,
translationFlags,
XxHash64.HashToUInt64(Encoding.UTF8.GetBytes(string.Join('\n', args)))
XxHash64.HashToUInt64(Encoding.UTF8.GetBytes(string.Join('\n',
args.Select(x => x.Trim().ToLower().Replace('\\', '/')).Where(x => x.Length > 0))))
);
}

Expand Down
3 changes: 2 additions & 1 deletion sources/SilkTouch/SilkTouchGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public async Task<GeneratedSyntax> GenerateSyntaxAsync(
jobConfig
.AsEnumerable()
.Where(x => x.Key.StartsWith($"Jobs:{key}", StringComparison.OrdinalIgnoreCase))
) + string.Join(',', rsps.Select(x => x.FileHash))
.OrderBy(x => x.Key)
) + string.Join(',', rsps.Order().Select(x => x.FileHash))
)
.Replace('\\', '/')
.ToLower();
Expand Down

0 comments on commit 1e2552a

Please sign in to comment.