Commit Graph

28 Commits

Author SHA1 Message Date
ryan vance
02bb20415f Copy up from DS to Main
#rb CopyUp



#ROBOMERGE-OWNER: ryan.vance
#ROBOMERGE-AUTHOR: ryan.vance
#ROBOMERGE-SOURCE: CL 12149088 via CL 12150247
#ROBOMERGE-BOT: (v659-12123632)

[CL 12150618 by ryan vance in Main branch]
2020-03-12 14:08:52 -04:00
ben marsh
0aa673b5fe UBT: Fix makefile being invalidated by response files updated during the build process. Also fix certain source files excluded from unity builds from triggering makefile invalidation.
Creation time of the makefile was being used to test whether dependencies have been modified, which is valid for external dependencies (since we want to catch any files modified after the build process starts), but not valid for files we create during the makefile building (such as response files).

Code attempting to detect response files was also incorrect, and would find any leaf files not included in a unity blob. Response files are now detected explicitly.

#rb none
#jira

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

[CL 12076084 by ben marsh in Main branch]
2020-03-09 13:20:18 -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
c291a7c37c Store the executable for each target in the makefile, so binary builds can construct the correct mutex name for detecting whether Live Coding is active.
#rb none
#rnx
#jira UE-77082

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 7309692 in //UE4/Release-4.23/... via CL 7309695
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v371-7306989)

[CL 7359309 by ben marsh in Dev-Build branch]
2019-07-17 02:07:54 -04:00
ben marsh
8ffd965435 Fix UHT being run every time a target is compiled in an installed build. Precompiled modules were not being filtered out of the list of outdated headers for dependency checking.
#rb none
#jira UE-73197

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 7232838 in //UE4/Release-4.23/... via CL 7232840
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v367-6836689)

[CL 7241337 by ben marsh in Dev-Build branch]
2019-07-09 00:44:08 -04:00
Ben Marsh
cfe09c649f Merging //UE4/Dev-Main to Dev-Build (//UE4/Dev-Build)
#rb none
#rnx

[CL 6922670 by Ben Marsh in Dev-Build branch]
2019-06-10 19:47:29 -04:00
ben marsh
2a14464a21 UBT: Fix issues with UBT not detecting new files with reflection markup. Was previously not correctly sub-directories, nor checking for new UHT types being added to a module that was not previously being scanned.
#rb none
#jira UE-74579

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 6863680 in //UE4/Main/...
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v366-6836689)

[CL 6917137 by ben marsh in Dev-Build branch]
2019-06-10 16:16:15 -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
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
Ben Marsh
1e2a861ef7 UBT: Fix makefile not being invalidated if a directory containing source files is added.
#rb none
#fyi Martin.Ridgers

[CL 5558644 by Ben Marsh in Dev-Build branch]
2019-03-26 14:39:57 -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
bbb8057a5e Merging //UE4/Dev-Main to Dev-Build (//UE4/Dev-Build)
#rb none
#rnx

[CL 4820573 by Ben Marsh in Dev-Build branch]
2019-01-26 14:33:56 -05:00
Ben Marsh
e74aff4e60 UBT: Allow pre-build steps to do things that may invalidate the makefile. After loading a makefile, we validate that anything that can affect the pre-build scripts and execute them, then check whether the makefile is still valid for the working set of source files. If not, we discard the makefile and rebuild it (without executing the pre-build steps).
#rb none
#jira UE-47634

[CL 4701996 by Ben Marsh in Dev-Build branch]
2019-01-10 13:40:51 -05:00
Ben Marsh
210b713174 UBT: Invalidate the makefile if any plugin is added or removed. It may be enabled by default.
#rb none
#jira UE-67573

[CL 4682035 by Ben Marsh in Dev-Build branch]
2019-01-04 13:19:00 -05:00
Ben Marsh
ab043601f1 UBT: Remove the project dependency on ShaderCompileWorker being compiled for any project targets. Instead, SCW is built through the same UBT invocation that builds the editor, allowing files to be built in parallel. This also removes the dependency on ShaderCompileWorker being built for non-editor targets (since Visual Studio does not support per-configuration project dependencies).
#rb none

[CL 4681497 by Ben Marsh in Dev-Build branch]
2019-01-04 10:58:28 -05:00
Ben Marsh
9033d6cb20 UBT: Renaming variables, updating comments.
#rb none
#rnx

[CL 4678702 by Ben Marsh in Dev-Build branch]
2019-01-03 11:34:55 -05:00
Ben Marsh
f87f1a379b UBT: Save command-line arguments into the target makefile, so we can invalidate it if they change.
#rb none

[CL 4678560 by Ben Marsh in Dev-Build branch]
2019-01-03 11:08:19 -05:00
Ben Marsh
e8a2d4c3b1 UBT: Improve performance of timestamp checking in makefile; used cached file states rather than querying the filesystem directly.
#rb none
#rnx

[CL 4672600 by Ben Marsh in Dev-Build branch]
2018-12-20 21:23:23 -05:00
Ben Marsh
a2f0e63941 UBT: Reduce false positives when detecting that source directories have changed.
If the directory timestamp has changed, we now rebuild a list of source files and compare it to the previous list. Visual Studio seems to write out a temporary file during a save operation, which modifes the directory timestamp and invalidates the makefile.

#rb none
#rnx

[CL 4672525 by Ben Marsh in Dev-Build branch]
2018-12-20 18:39:52 -05: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
439ab9e0df UBT: Fix incorrect timezone in makefile out-of-date checks.
#rb none
#rnx

[CL 4671885 by Ben Marsh in Dev-Build branch]
2018-12-20 12:27:27 -05:00
Ben Marsh
61701a788c UBT: Optimize file operations to use cached file/directory info, and to discover plugins/rules files in parallel. Also add more stats for different parts of the build.
#rb none
#rnx

[CL 4671815 by Ben Marsh in Dev-Build branch]
2018-12-20 10:46:51 -05:00
Ben Marsh
0270d8f66a UBT: Add a cache for source file metadata (containing text from the first include directive, and a flag for whether the file contains reflection markup). Replaces the previous include dependency cache, since we now only require the first include directive. Saves ~2s whenever UHTModuleInfo array has to be regenerated.
#rb none

[CL 4668325 by Ben Marsh in Dev-Build branch]
2018-12-18 10:21:34 -05:00