Commit Graph

65 Commits

Author SHA1 Message Date
devin doucette
c6b3357b73 UBT: Fixed bAdaptiveUnityCompilesHeaderFiles dependency tracking
The header is now added to the working set rather than the generated source file.

#rb Mark.Lintott
#rnx
#preflight 61bb6e026c2686e86320ec95

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18476588 in //UE5/Release-5.0/... via CL 18481358
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18481449 by devin doucette in ue5-release-engine-test branch]
2021-12-16 19:28:41 -05: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
89677b0b3d UnrealBuildTool: Make WorkingSet & CandidateWorkingSet mutually exclusive.
Prevents a case where edits to source files would cause Makefile to be invalidated.

#rb ben.marsh
#jira none

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 17496558 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17496572 by jonathan adamczewski in ue5-release-engine-test branch]
2021-09-13 17:02:24 -04:00
ben marsh
9e32e05d71 UBT: Fix files added to the working set not invalidating the makefile.
[FYI] Andy.Firth

#ROBOMERGE-SOURCE: CL 17074097 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17074113 by ben marsh in ue5-release-engine-test branch]
2021-08-05 15:22:32 -04:00
joe kirchoff
9c7615fd72 UnrealBuildTool: Clean up VCToolChain functions that add command line args to be more consistently used, allowing more paths that can be relative to reduce command line length
Verified relative pathing works fine for msvc clang builds
Use .d files for dependencies when compiling with windows clang, instead of piping through cl-filter.exe
Use relative pathing for generated unity files

#rb Jonathan.Adamczewski
#rnx
#preflight 60d4de2bcaf0590001e62de9
#preflight 60d4efbccaf0590001e9af24

#ROBOMERGE-SOURCE: CL 16779820 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16779826 by joe kirchoff in ue5-release-engine-test branch]
2021-06-24 19:01:22 -04:00
jonathan adamczewski
ad86e81438 UnrealBuildTool:
Add a StringComparison argument to CreateIntermediateTextFile() and require callers to make a decision about the case-sensitivity used when considering whether to re-write a file.

(This is intentionally explicit and verbose at the call-site - we should implement a better solution. This change makes it clear that there is work to be done to be able to simplify the interface and achieve reliable behavior.)

As a first pass, C++ files (headers, cpp files, pch files) will have a case-sensitive comparison (C++ code is, mostly, case sensitive), Linux script files have a case-sensitive comparison (case-sensitive filesystem), and all other files are compared disregarding case - to match pre-existing behavior, and with the desire to not borrow more surprises than necessary.

#jira none

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

[CL 16616345 by jonathan adamczewski in ue5-release-engine-test branch]
2021-06-09 19:45:21 -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
Devin Doucette
800b4e9427 UBT: Fixed bAdaptiveUnityCompilesHeaderFiles to use generated files to include headers
#rb Ben.Marsh
#rnx
#robomerge[STARSHIP] Release-5.0-EarlyAccess

[CL 15666062 by Devin Doucette in ue5-main branch]
2021-03-10 11:23:43 -04:00
Devin Doucette
8b1f950403 UBT: Apply optimization, precompiled header, and header build behaviors to the working set even when unity is disabled on the module
#rn Ben.Marsh
#robomerge[STARSHIP] Release-5.0-EarlyAccess
#fyi Brandon.Dawson

[CL 15645534 by Devin Doucette in ue5-main branch]
2021-03-08 16:58:01 -04:00
Devin Doucette
966706f9dd UBT: Restored OrdinalIgnoreCase sort order for unity files
#rb none
#rnx
#robomerge[STARSHIP] Release-5.0-EarlyAccess

[CL 15645525 by Devin Doucette in ue5-main branch]
2021-03-08 16:56:07 -04:00
Devin Doucette
a3f68f3798 UBT: Sort includes in unity files by InvariantCultureIgnoreCase for consistency with the previous implementation
#rb none
#rnx
#robomerge[STARSHIP] Release-5.0-EarlyAccess

[CL 15641897 by Devin Doucette in ue5-main branch]
2021-03-08 12:47:09 -04:00
Devin Doucette
d553d0a4e0 UBT: Changes to adaptive unity to expose more non-unity errors
- Exclude source files from unity if their first include is in the working set.
- Compile header files in the working set in their own dedicated source file if there is not an existing source file that includes it first.

#rb Ben.Marsh
#robomerge[STARSHIP] Release-5.0-EarlyAccess

[CL 15639040 by Devin Doucette in ue5-main branch]
2021-03-08 10:40:17 -04:00
Ben Marsh
6f927647b1 Changing C# code over to using EpicGames.Core over DotNETCommon.
#rb none
#rnx

[CL 14962096 by Ben Marsh in ue5-main branch]
2020-12-21 23:07:37 -04:00
Ben Marsh
68f5abeb09 UBT: Convert UnrealBuildTool to use nullable references.
#rb none
#rnx

[CL 14960546 by Ben Marsh in ue5-main branch]
2020-12-20 18:47:42 -04:00
michael sartain
43ef13a97b Fix UnrealBuildTool unused variable warnings
#jira none
#rb Ben.Marsh
[FYI] Andrew.Grant, Brandon.Schaefer

#ROBOMERGE-SOURCE: CL 12224860 in //UE4/Release-4.25/... via CL 12224862
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v663-12210973)

[CL 12224868 by michael sartain in Main branch]
2020-03-16 19:04:42 -04:00
ben marsh
09ca12ccef Refactor UBT to use an interface (IActionGraphBuilder) to construct the action graph. Response files are also constructed through this interface, allowing them to be tracked as dependencies (will be added in subsequent change).
#rb none
#jira

#ROBOMERGE-SOURCE: CL 12038895 in //UE4/Release-4.25/... via CL 12038911
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v657-12064184)

[CL 12076066 by ben marsh in Main branch]
2020-03-09 13:20:14 -04:00
Ryan Durand
9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00
Ben Marsh
ec2464a292 UBT: Add a mechanism for versioning which build settings UBT should use by default.
Any build targets have a DefaultBuildSettings property. For engine targets, this defaults to BuildSettingsVersion.Latest. For project targets, this defaults to BuildSettingsVersion.Release_4_23. For new projects, this will default to the engine version they are created from.

If a target is not using the latest default build settings, they will receive a message describing the settings that have changed, like this:

    [Upgrade]
    [Upgrade] Using UE 4.23 compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
    [Upgrade]     bLegacyPublicIncludePaths = false                 => Omits subfolders from public include paths to reduce compiler command line length.
    [Upgrade]     PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs   => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html.
    [Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.Release_4_24;' in UnrealPak.Target.cs, and explicitly overriding desired settings.
    [Upgrade]

Intent is to reduce friction for users initially upgrading to new engine versions, while notifying them of more optimal build settings being available, and letting them choose when (or if) to use them.

#rb none

[CL 8556769 by Ben Marsh in Dev-Build branch]
2019-09-06 15:59:52 -04:00
Ben Marsh
ba077509fe Live Coding: Fix crashes when patching adaptive non-unity files in game modules containing static global variables.
Live++ reads object files at startup for game modules, and assigns unique ids to each compiland (used to disambiguate static variables). When compiling the patch, these compilands are modified to reference a unique id for the unity blob, causing the variables to be reconstructed.

Solution is to generate a JSON file to each output directory containing object files containing the mapping, and to use that to assign compiland ids at startup.

#rb none
#jira UE-74036

[CL 6453851 by Ben Marsh in Dev-Build branch]
2019-05-14 17:48:05 -04:00
Josh Adams
1e4b186150 - Big update to platforms: PlatformExtensions
- This allows for Confidential platforms to exist outside of the engine, and insert themselves in as needed
- Directory structure is, where .... mirrors the directory structure for Engine and projects
     - /Platforms/XXX/....
- Moving to more data driven approach for ShaderPlatforms and PlatformInfo, where they can be read from DataDrivenPlatformInfo.ini files that live in the platform config folders
- Removed platform mentions from UBT, by way of changing some enums to partial classes with static members (see UnrealTargetPlatform)
- Various other UBT/UAT modifications to allow for looking in other locations for files
- THIS IS NOT A COMPLETE AND FINAL SOLUTION. WE WILL CONTINUE WORK IN DEV-BUILD BEFORE ITS READY FOR PRIMETIME
#rb ben.marsh

[CL 6271418 by Josh Adams in Dev-Build branch]
2019-05-03 08:03:23 -04:00
Ben Marsh
3a5790fdae LiveCoding: Fix asserts/crashes due to variables being reconstructed when files are split out of a unity blob.
These variables (and their dynamic initializers) were being treated as new, rather than being linked back to their original instances. UBT now outputs a mapping of object files to their original unity object file during a live coding compile, which allows Live++ to disambiguate between new and reconstructed instances.

#rb none

[CL 5988834 by Ben Marsh in Dev-Build branch]
2019-04-18 13:54:03 -04:00
peter engstrom
2099c1c03d Use forward slashes in include paths.
#rb ben.marsh
#rnx

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: peter.engstrom
#ROBOMERGE-SOURCE: CL 5667718 via CL 5667743 via CL 5667748 via CL 5667751 via CL 5668993 via CL 5668997
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build)

[CL 5670337 by peter engstrom in Dev-Build branch]
2019-04-01 13:02:25 -04:00
Ben Marsh
07e535411b Merging //UE4/Dev-Main to Dev-Build (//UE4/Dev-Build)
#rb none
#rnx

[CL 5435186 by Ben Marsh in Dev-Build branch]
2019-03-18 16:38:36 -04:00
Ben Marsh
78ebc86abd UBT: Change UEBuildTarget.Build() to return a construct and return a makefile.
#rb none
#rnx

[CL 4672505 by Ben Marsh in Dev-Build branch]
2018-12-20 17:29:52 -05:00
Ben Marsh
c5b6fefcc7 UBT: Add a DirectoryItem class, similar to FileItem, which caches directory contents and properties. Allows constructing FileItem objects from enumerated FileInfo objects, avoiding additional I/O hit to determine attributes. DirectoryLookupCache is converted to use DirectoryItem objects as part of this change.
#rb none
#rnx

[CL 4670115 by Ben Marsh in Dev-Build branch]
2018-12-19 10:44:11 -05:00