Sharpmake
Sharpmake copied to clipboard
Experimental light cache
Add .UseLightCache_Experimental to fastbuild compiler section
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))
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.
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.