how to set /LTCG flag in 4.18 ???

I’ve needs to set the /LTCG flag and I’ve searched the result about it , but “BuildConfiguration.bAllowLTCG = true;” is not available in 4.18.3. I’ve also looked up Using the Unreal Engine Build Pipeline | Unreal Engine 5.2 Documentation, it looks like there is not way to set the flag directly. I’m using Launcher version and really don’t wanna change the UBT code. Is there a way?

You don’t use “BuildConfiguation.” in front of it, just put bAllowLTCG = true; in your target.cs file directly.

…I’ve tried it. it looks like bAllowLTCG is not a meber or ModuleRules…

It needs to go in target.cs, not build.cs

Ok, Thank you indeed, helped a lot :slight_smile: