Changing BuildConfiguration(.xml) in 4.16

I’m trying to change the build configuration settings for our UE4 C++ Project in 4.16. Problem is that for my 4.16 install I have no default BuildConfiguration.xml (only one in /Saved/ which is pretty much empty) while 4.15 has one in \UnrealEngine\Engine\Programs\UnrealBuildTool as suggested in the first url below.

I’ve been using these as reference:

Trying to add the custom rules via BuildConfiguration.bUseIncrementalLinking = true; for example doesn’t compile. And adding my own BuildConfiguration.xml in /Saved/ of the engine folder as suggested doesn’t work either.

Has anyone used custom .xml or custom build.cs for 4.16? I’d love to try some of the custom build options to see if we can improve compile times.

1 Like

It’s really strange!!!
It’s look like you need to alternate between the options in the build.cs file and the xml file.
This is my configuration and it’s compiling (but I don’t know if it’s working???):

Thanks! I’ll try this out. I may have just messed up my syntax in the .xml file.

I tried setting the variables in the .build.cs file but the build system did not pick them up, I must be doing something wrong syntax wise. (eg. how would you enable incremental linking via the Build.cs file?)

Generally you should only need to modify things in the Build.cs file if you need them on a per-project or per-module basis. Otherwise use the following locations of BuildConfiguration.xml:

Engine/Saved/UnrealBuildTool - For a specific engine version.

Documents/Unreal Engine/UnrealBuildTool - For all installed engine versions.

I just have the following at the latter location, for example:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<BuildConfiguration>
		<bShadowVariableErrors>true</bShadowVariableErrors>
		<ProcessorCountMultiplier>2</ProcessorCountMultiplier>
	</BuildConfiguration>
</Configuration>

The fact they seem to have removed the default one in 4.16 shouldn’t matter, the defaults are still no doubt defined somewhere, so you can just add to the empty shell in Engine/Saved/UnrealBuildTool, or add a similar one in the documents folder if you want it to persist for future engine installs. Anything not specified will just be inherited.

I haven’t tried adjusting that, but it would be a project level setting not module level, so I’d imagine it would be set in the Target.cs file. Here it is.

I suspect it’s probably only relevant in non-editor builds.

The absolute new location of:

C:\Users&lt;user>\Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml

in 4.17 is at:

C:\Program Files\Epic Games\UE_4.17\Engine\Saved\UnrealBuildTool

Well atleast on my pc :stuck_out_tongue:



Cheers,

RJ

Bit of a necro but as of 4.19 the C:\Users\Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml is still working.

I found mine in C:\Users\MyUser\AppData\Roaming\Unreal Engine\UnrealBuildTool while running 4.22

Found it here

It seems to be located in several places

there on 4.25

On 4.27 at least, the xml is now:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
		<ParallelExecutor>
			<ProcessorCountMultiplier> 0.7 </ProcessorCountMultiplier>
			<bStopCompilationAfterErrors> true </bStopCompilationAfterErrors>
		</ParallelExecutor>
</Configuration>
1 Like

Thanks, @, this also works for UE5.0.