[PROJUCER] Shared Code > 2GB Lib

@Matthieu_Brucher Yes that makes sense. I think you’re right.

Okay, so after doing a bunch of tests… including splitting the JUCE code into a separate static library… what I’ve ended up doing is in the C++ Optimization setting disable /GL (Whole Program Optimization) and enable the General LTCG (Whole Program Optimization) option. This disables Profile Guided Optimizations for the code in the library

https://msdn.microsoft.com/en-us/library/e7k32f4k.aspx

but it dramatically reduces the size of the static library created.

So currently I have all the projects using /GL and LTCG except the Shared Code which has LTCG without /GL… since the JUCE code is a separate static library it has /GL enabled.

Rail

5 Likes

Also experiencing the same issue as Jon here – my shared code .lib on windows is over 3GB for release build (on debug it’s more like 100mb). Disabling Whole Program Optimization also did the trick and the SharedCode library is a size that the other versions are able to link against.