Sharpmake icon indicating copy to clipboard operation
Sharpmake copied to clipboard

Experimental light cache

Open somarasa opened this issue 4 years ago • 2 comments
trafficstars

Add .UseLightCache_Experimental to fastbuild compiler section

somarasa avatar Jan 26 '21 10:01 somarasa

Using this experimental flag with compiler other than MSVC produces:

FASTBuild Error #1502 - Compiler() - LightCache only compatible with MSVC Compiler.

If we want to set this flag globally, we should only apply it to MSVC compilers in BFF like maybe this:

using (masterBffGenerator.Declare("fastBuildUseLightCache", (FastBuildSettings.FastBuildUseLightCache && compilerSettings.FastBuildCompilerFamily == CompilerFamily.MSVC) ? "true" : FileGeneratorUtilities.RemoveLineTag))

doanamo avatar Oct 06 '21 16:10 doanamo

We've added a way to add raw options to individual compiler nodes that could be used as a workaround, like this:

FastBuildSettings.AdditionalCompilerSettings.Add("Compiler-x64", new List<string>() {
    ".UseLightCache_Experimental = true"
});

Ideally we should have a way to set fastbuild settings per conf.

belkiss avatar Oct 06 '21 16:10 belkiss

we won't merge this. We will eventually add light cache support once it no longer has an experimental suffix. Until then, use the workaround stated above. This is what we do internally at Ubisoft.

jspelletier avatar May 12 '23 13:05 jspelletier