Commit Graph

57 Commits

Author SHA1 Message Date
mickael gilabert
73d8fd4e07 [UBT] Added IExternalAction.bShouldOutputLog to prevent certain process to spam console output
[REVIEW] [at]joe.kirchoff, [at]henrik.karlsson
#rnx

#rb Joe.Kirchoff

[CL 33206112 by mickael gilabert in ue5-main branch]
2024-04-24 13:58:20 -04:00
joe kirchoff
671c2e320e UnrealBuildTool: Keep track of root paths per action
#rb henrik.karlsson

[CL 33040286 by joe kirchoff in ue5-main branch]
2024-04-17 12:53:34 -04:00
joe kirchoff
517c200725 Remove some obsolete command line args
#rnx

[CL 32410750 by joe kirchoff in ue5-main branch]
2024-03-21 15:33:55 -04:00
joe kirchoff
73a6de9a05 UnrealBuildTool: Box -> UBA. Command line args are doubled up until all usage can be updated
#rnx

[CL 29570778 by joe kirchoff in ue5-main branch]
2023-11-08 14:48:41 -05:00
joe kirchoff
c44fc5fd4a UnrealBuildTool: Print action groups in parallel executor when building multi target
#rnx

[CL 27006666 by joe kirchoff in ue5-main branch]
2023-08-10 15:38:17 -04:00
henrik karlsson
97a4015f60 [UBT]
* Added actions first produced item directory path as part of sorting for scheduling. This groups modules together nicely which will benefit when running things remotely where remotes takes batches of actions at the time meaning there is a higher chance each remote helper will need to download fewer variations of pch files

#rb  joe.kirchoff

[CL 26856192 by henrik karlsson in ue5-main branch]
2023-08-04 15:04:09 -04:00
henrik karlsson
be9eb407a8 [UBT]
* Added AdditionalDescription parameter to ParallelExecutor.RunAction
* Added bCanExecuteInBox for actions

[CL 25968700 by henrik karlsson in ue5-main branch]
2023-06-13 20:26:15 -04:00
joe kirchoff
c04da27b3b UnrealBuildTool: More automated code cleanup
#rnx
#preflight 64767efb4b1ead7c7f428c7a

[CL 25693857 by joe kirchoff in ue5-main branch]
2023-05-30 18:59:32 -04:00
joe kirchoff
36d266e932 UnrealBuildTool: Automated code cleanup
#rnx
#preflight 6476799e947ff6973c225619

[CL 25693241 by joe kirchoff in ue5-main branch]
2023-05-30 18:38:07 -04:00
tim smith
cf626105dd 1) Replaced bCanCache with new artifact mode flags
2) Added support in artifacts for relative paths
3) Modified ISPC header generation to be cached

At this time, only MSVC compiles are cached and -deterministic must be specified when building.

#rb josh.adams
#preflight 6470a172054af2576a2bd4b9

[CL 25647092 by tim smith in ue5-main branch]
2023-05-26 12:48:45 -04:00
henrik karlsson
11ea5c4396 [UBT]
* Added bCanExecuteRemotelyWithXGE so actions that can't execute remotely because of xge don't turn of remote execution for sndbs etc

#preflight 6448200b877716c878468070
#rb joe.kirchoff

[CL 25192137 by henrik karlsson in ue5-main branch]
2023-04-25 19:24:51 -04:00
joe kirchoff
e0254d98e8 UnrealBuildTool: Fix Action properties that weren't being serialized
#rnx

[CL 24878293 by joe kirchoff in ue5-main branch]
2023-03-31 16:51:20 -04:00
henrik karlsson
edfbc7c5f8 [UnrealBuildTool]
* Added bCanCache to actions and enabled bCanCache to vc compile/link if /experimental:deterministic is set (because it can actually be cached then :-))

#preflight  6412214a924023147db1d829
#rb joe.kirchoff

[CL 24665382 by henrik karlsson in ue5-main branch]
2023-03-15 19:43:56 -04:00
bryan sefcik
1ad98523c4 Added support to give actions in UBT "weight". "Weight" is an average measurement of how many cores and memory an action uses. Using one core with a normal amount of memory for an action would be a value of 1.
Why do this:
Currently when compiling a cpp file with MSVC, it compiles across multiple cores while clang does not. This means that while we support limiting the number of cores(using ProcessorCountMultiplier), MSVC will use more cores than we specify. It also means that MSVC will always be faster when compiling because clang does not support compiling a cpp over multiple cores. To get similiar results when compiling with clang, we set the weight of MSVC to 1.5 and the weight of clang to 1.0. We then set the ProcessorCountMultiplier to 1.5. This results in MSVC and clang taking roughly the same amount of CPU utilization and clang compiles to be much faster.

	                     Old Timing(secs)	Old CPU Utilization	New Timing	New CPU Utilization(secs)
PlatformA AncientGame	590.94	51	                               431.47	73
MSVC AncientGameEditor	1016.96	94	                             1026.08	95
Clang AncientGameEditor	1543.72	63	                               1270.4	84
PlatformB AncientGame	494	52	                               396.95	74

Old = without weight path
New = with weight path

#jira
#rb christopher.waters, joe.kirchoff
#preflight 6409026c8832f48a4dc72025

[CL 24567859 by bryan sefcik in ue5-main branch]
2023-03-08 17:08:22 -05:00
Joe Kirchoff
d09dac245a UnrealBuildTool: Ignore conflicts in CreateAppBundle Actions
#rnx
#rb trivial
#preflight 63ebd366e92f139c51bd9250

[CL 24216855 by Joe Kirchoff in ue5-main branch]
2023-02-14 13:43:33 -05:00
henrik karlsson
5f74d114d5 [UBT]
Changed how single files are built. We don't want to invalidate makefile everytime we build single files since it destroys turnaround times. With this change a single file compile can take 2s (+ the actual compile time).

The new behavior injects a special action per module when creating the makefile. These actions can be used to on-the-fly create a proper compile action that follows the rules of the module that the specific file belongs to.. In a normal build these actions are ignored since the logic deciding which actions to build is backtraced from which binaries we want to create.

When a specific file compile is triggered, the logic deciding which files to build search up all these special actions and create a lookup based on which folders the special actions handle. It then try to find the special action that handles the specific file. The matching special action then creates a compile action that can handle that specific file and then queue up the action for execution. If no special action is found it falls back to try to use actions that have this specific file as input (ispc files for example)

Details:
* Removed lots of custom code for "specific files" handling
* Changed so pch (both private and shared) always use definition file. Added #pragma once and change so pch wrapper file include definition file. This made the adaptive path and specific file easy to implement (just disable pch in compile environment and it will just work)
* Added SingleFileAction for both VCToolChain and ClangToolChain. It now works to compile specific headers and cpp files. (It creates wrapper files on the fly to be able to compile all header files (compiling headers directly blow up if there are circular includes)
* Fixed so GenerateClangDatabase mode works with new changes
* Moved the logic that makes sure all (directly) depending cpp files are recompiled when .h are included in the singlefile option

#preflight 63dcc46f78716a01e8069649
#rb joe.kirchoff

[CL 24094027 by henrik karlsson in ue5-main branch]
2023-02-09 04:20:43 -05:00
henrik karlsson
5f7fa70d36 [UBT]
* Changed how sorting of Actions is made. This to increase throughput of builds and reduce bubbles.
  1. Changed so after actions are sorted based on dependency count we do a second pass and try to move linking to as early as possible. Reason is because linking is less cpu intense and makes sense to do in parallel with compiling instead of all linking happening at the end. Linking is also not remotely executed in some scenarios and therefore we want the local host to do the linking while other actions are remotely executed
   2. Added a high priority flag that can explicitly be set on actions. This is now set on actions building precompiled headers which often takes a long time and can push out builds if they are only prioritized based on dependency count. This flag is also used in IWYU build mode to build headers first (to flush out errors early) and will most likely be used in header unit builds to prioritize header unit files before other code files.

With these changes plus a following change in ParallelExecutor.cs FortniteEditor wall time went down from ~15m to 13m  (tested three times with and without changes)

#preflight 63d822b95c69f453c11c0ce5
#rb joe.kirchoff

[CL 23923446 by henrik karlsson in ue5-main branch]
2023-01-31 01:16:13 -05:00
Joe Kirchoff
08c9da4050 UnrealBuildTool: Don't merge actions that ignore conflicts
#rnx
#rb trivial
#preflight 63cf3c0ad83c1837b161147a

[CL 23826242 by Joe Kirchoff in ue5-main branch]
2023-01-23 21:21:25 -05:00
Joe Kirchoff
4a262359a0 UnrealBuildTool: Store Action file lists in SortedSets rather than Lists, since these collections should never have duplicate entries and sorting them helps when checking for action conflicts
Requires implementing IComparable\IEquatable in FileItem (and I also implemented them in DirectoryItem for consistency)

#rnx
#rb Tim.Smith
#preflight 63c1cce4a06ab115ea17ba4f
#preflight 63c70f4d7763631ba15486ea

[CL 23745743 by Joe Kirchoff in ue5-main branch]
2023-01-17 16:35:14 -05:00
bryan sefcik
6245f9d961 Minor optimizations in UBT to improve time when creating the action graph.
#jira
#preflight 6335f77e2f447ea8dc26f758

[CL 22264273 by bryan sefcik in ue5-main branch]
2022-09-30 01:41:38 -04:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
jonathan adamczewski
0be8e00ec1 UnrealBuildTool: Show StatusDescription in debugger for LinkedAction
#jira none
#trivial

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 17692862 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17692885 by jonathan adamczewski in ue5-release-engine-test branch]
2021-10-01 12:10:54 -04:00
jonathan adamczewski
a865a21fb0 Move FileItem and DirectoryItem into BuildUtilities
#jira none

#ROBOMERGE-SOURCE: CL 16596289 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16596323 by jonathan adamczewski in ue5-release-engine-test branch]
2021-06-08 19:06:03 -04:00
Ben Marsh
69d6f57566 UBT: Fix error trying to read makefile, due to value being null.
[CL 16170433 by Ben Marsh in ue5-main branch]
2021-04-30 13:31:27 -04:00
Marc Audy
bf80889353 UE5/Release-Engine-Staging to UE5/Main
This represents UE4/Main up to CL# 14958402

[CL 15028197 by Marc Audy in ue5-main branch]
2021-01-08 19:56:07 -04:00