How does Unreal packs its first-party dlls with the game .exe?

When you build Unreal’s source code it generates lots off dlls, when you use the built engine to deploy a game the result is a game with a single executable. How does Unreal packs its first-party dlls into a single .exe?

There is a preprocessor called IS_MONOLITHIC in the engines code but changing its value for deploying wouldn’t require the full engine to be rebuilt?

I’ve just figured out.

In the IMPLEMENT_MODULE macro there is an IMPLEMENT_MODULE_##ClassName that the builder adds to the linker’s property /INCLUDE. This forces the linker to reference the module.