Sharpmake icon indicating copy to clipboard operation
Sharpmake copied to clipboard

Do not sort list of compiler extra files in master Bff

Open doanamo opened this issue 3 years ago • 0 comments

FastBuild calculates toolchain manifest hash key based on binary contents of compiler files, where paths of these files are not being factored it - it should not matter whether absolute or relative paths are used. However, order of these files listed in BFF changes the resulting hash key, which will invalidate or break compatibility with existing FastBuild cache. This can happen unpredictably with vendoring when some build tools stored in version control could end up before/after other files in the list that are installed in the system. Extra files for compiler are already being added in deterministic order, so there should be no need to sort them in BFF.

Example of described problem: Sorting "C:\Program Files (x86)\Windows Kits\10\Redist\" against "C:\a_workspace_repo\vendor\MSVC" and "C:\z_workspace_repo\vendor\MSVC" directories gives two different orders that produces different tool manifest hash keys. In this case it should not matter where workspace with vendored build tools is located - with relative paths developer should be able to choose where to place them and still remain compatible with existing cache.

doanamo avatar Jul 05 '22 14:07 doanamo