# Slim down engine source build?

**URL:** <https://forums.unrealengine.com/t/slim-down-engine-source-build/406796>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** source-build, Optimization, engine-compile, Platforms, unreal-engine, Platform, question\
**Created:** [October 11, 2017, 11:32pm UTC](https://forums.unrealengine.com/t/slim-down-engine-source-build/406796 "2017-10-11T23:32:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b65ae2a21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b65ae2a21](https://forums.unrealengine.com/u/anonymous_user_b65ae2a21)\
**Post date:** [October 11, 2017, 11:32pm UTC](https://forums.unrealengine.com/t/slim-down-engine-source-build/406796/1 "2017-10-11T23:32:43Z")

</div>

I’m currently compiling the engine from source that I forked on GitHub.

I would like to slim down the engine compile time and size by removing platforms I’m not interested in.  
So far I’ve done the following:

- When using Setup.bat: added -exclude=“…” for all the platforms I don’t want.
- In TargetPlatform.Build.cs: commented out all ‘DynamicallyLoadedModuleNames.Add(“…”);’ that deal with platforms I don’t want, like “AndroidTargetPlatform”.
- In UnrealBuildTool.cs: changed the ‘static public UnrealTargetPlatform[] AllPlatforms’ array to contain only the platforms I want.
- In the AllDesktop.Automation.cs: commented out the Mac and Linux enum’s from the “GetStagePlatforms()” ovveride function.
- In the UE4.sln, unloaded the unwanted projects under Programs/Automation like “Android.Autiomation”.

Beyond that I’m abit clueless, or not even sure if what I just described will have the correct effect. Does anyone have experience with this?

---

<div class="post-metadata">

**Author:** ![BladeMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BladeMaster](https://forums.unrealengine.com/u/BladeMaster)\
**Post date:** [February 9, 2021, 4:11pm UTC](https://forums.unrealengine.com/t/slim-down-engine-source-build/406796/2 "2021-02-09T16:11:51Z")

</div>

Were you able to figure this out?
