liamkf / Unreal_FASTBuild

Allows UnrealEngine to be built with FASTBuild for VS2015/VS2017 and Windows 10.
MIT License
180 stars 71 forks source link

FASTBuild not used when compiling the engine using BuildGraph? #28

Closed TheEmidee closed 6 years ago

TheEmidee commented 6 years ago

Hello,

I have no problem compiling UE4 in VS2017 with FASTBuild. All the work is being correctly distributed to all the workers of the pool.

But when I want to compile the engine using BuildGraph, using that command-line for example:

F:/Projects/ConsoleDev/UnrealEngine/Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target="Make Installed Build Win64" -set:WithDDC=false -set:WithFeaturePacks=false -set:WithWin64=true -set:WithPS4=true -set:WithSwitch=true -set:WithXboxOne=true -set:WithTVOS=false -set:WithLinux=false -set:WithIOS=false -set:WithAndroid=false -set:WithMac=false -set:WithHTML5=false -set:WithWin32=false -set:OutputDirectoryOverride=F:/ShiftQuantumBuilds/UE4 -script="F:/Projects/ConsoleDev/UnrealEngine/Engine/Build/InstalledEngineBuild.xml"

FASTBuild is not used.

Is there something missing in the provided CS file to have FASTBuild triggered?

Thanks !

liamkf commented 6 years ago

Hi there!

I don't have any experience with using the BuildGraph I'm afraid. But I imagine if it's building the code it will eventually have to call UnrealBuildTool, which if it's been modified should use FASTBuild where appropriate. I would try to see where UnrealBuildTool is launched from the automation tool when using BuildGraph and see the parameters, then try debugging UnrealBuildTool itself with those parameters if nothing seems obviously wrong.

Sorry I can't be more help!

Cheers, Liam

TheEmidee commented 6 years ago

I found out the problem is in UE4Build.cs

The function public bool CanUseXGE(UnrealBuildTool.UnrealTargetPlatform Platform) returned always true, and the code which uses that function is flawed, in the sense it does not try anything else than XGE if the function returns true.

As a quick workaround I made that function return false and now FastBuild is correctly used when using buildgraph