How to achieve deterministic DLL builds

I’m setting up a continuous build pipeline for my Unreal Engine project.

We use the engine in Binary configuration — meaning we build the “Installed Build” for Win64 and only rebuild our own plugins.

However, I’ve noticed that even when I recompile the code without changing any source files, the generated DLLs are always different.

This is problematic for incremental distribution, because each commit results in new DLLs to download, even if nothing has changed in the code.

Is there a way to make Unreal Engine produce deterministic builds for DLLs?

I’m using Visual Studio and Unreal Build Tool (UBT).

Any advice or experience with this kind of optimization would be appreciated!

We do support the experimental flags that Microsoft has added to MSVC, you can enable them by passing -Deterministic to UnrealBuildTool when compiling [[GitHub Link]](https://github.com/EpicGames/UnrealEngine/blob/6978b63c8951e57d97048d8424a0bebd637dde1d/Engine/Source/Programs/UnrealBuildTool/Configuration/TargetRules.cs#L2115)

Please be aware however that this is still an experimental setting from Microsoft and may have issues or may not actually be fully deterministic, and we are at the whims of the compiler that is being used to compile and link. Also enabling this mode will cause the code gen pass in MSVC to become single threaded, so your compile times will most likely increase depending on code complexity.

I’ll note as well that we have had this enabled for Shipping configurations (generally for only game applications) for a few years with no ill effects, but the reason we never enabled it for all configurations is due to the code gen being single threaded and slowing down compiles too much especially for local developer builds and the trade off was too severe to use it as a default.