How to set linker flags (/LTCG)?

anonymous_user_f3fb80e6
Thu, 24 Nov 2016 21:11:45 +0000
C++

I am using a static library (.lib) in my UE4 project. That basically works fine, however, I get the following warning during compilation:

“MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance”

Now according to MSDN this problem is based on the fact that the library is compiled with the /GL flag turned on (= Whole Program Optimization), but for the UE4 project the linker does not use the /LTCG flag (whereas both shoud be used or none).

So my question: How can I tell the linker in my UE4 project to use this /LTCG flag?

4 posts - 1 participant