Commit Graph

1000 Commits

Author SHA1 Message Date
anthony bills
1ef400627b Add support for whitelisting additional plugins and adding additional modules to plugin extensions.
Additionally allow monolithic programs inside platform extensions to ouput to the Binaries directory in the extension.

[at]brian.white, [at]josh.adams, [at]ben.marsh
#jira UE-81798
#rb ben.marsh

#ROBOMERGE-SOURCE: CL 11655119 in //UE4/Release-4.25/... via CL 11655234
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 11655284 by anthony bills in Main branch]
2020-02-27 10:47:20 -05:00
Ben Marsh
a7ebd68aed Fix exception running IncludeTool due to include path modules no longer being included in JSON export.
#rb none
#jira UE-89475
#robomerge[RELEASE] 4.25

[CL 11645998 by Ben Marsh in Main branch]
2020-02-26 21:06:57 -05:00
ben marsh
2868a46d82 Remove debug code.
#rb none
#rnx
#jira

#ROBOMERGE-SOURCE: CL 11631935 in //UE4/Release-4.25/... via CL 11631941
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v655-11596533)

[CL 11631949 by ben marsh in Main branch]
2020-02-26 11:06:01 -05:00
ben marsh
a3cada401a Fix incorrect force included files in intellisense data.
#rb none
#jira UE-89364

#ROBOMERGE-SOURCE: CL 11631903 in //UE4/Release-4.25/... via CL 11631909
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v655-11596533)

[CL 11631916 by ben marsh in Main branch]
2020-02-26 11:03:42 -05:00
ben marsh
39179672d2 Output a warning if the root path is longer than 50 characters.
#rb none
#jira UE-88446
[FYI] Martin.Sevigny

#ROBOMERGE-SOURCE: CL 11625250 in //UE4/Release-4.25/... via CL 11625255
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v655-11596533)

[CL 11625268 by ben marsh in Main branch]
2020-02-25 21:06:22 -05:00
ben marsh
661248e268 UBT: Output a warning if any intermediate path is > 200 characters under the UE root directory.
#rb none
#jira UE-88446

#ROBOMERGE-SOURCE: CL 11624846 in //UE4/Release-4.25/... via CL 11624849
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v655-11596533)

[CL 11624868 by ben marsh in Main branch]
2020-02-25 20:49:06 -05:00
ben marsh
534d943226 UBT: Fix error running UBT with -JsonExport if the target instantiates (but decides not to link) a module.
#rb none
#jira UE-88379

#ROBOMERGE-SOURCE: CL 11592316 in //UE4/Release-4.25/... via CL 11592323
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11592338 by ben marsh in Main branch]
2020-02-24 18:46:14 -05:00
ben marsh
0f217338cd Allow single file compile to work with generated cpp files.
#rb none
#jira UE-85511

#ROBOMERGE-SOURCE: CL 11592169 in //UE4/Release-4.25/... via CL 11592173
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11592176 by ben marsh in Main branch]
2020-02-24 18:40:49 -05:00
Getty
f1232f1840 PR #6697: Fix wrong setting name in error message of UEBuildTarget.cs (Contributed by Getty)
#jira UE-88831
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 11592053 in //UE4/Release-4.25/... via CL 11592056
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11592061 by ben marsh in Main branch]
2020-02-24 18:18:58 -05:00
ben marsh
0454bd151f Generate type library headers as a standalone build action, to eliminate contention when generated by multiple compiler instances.
Also add support for using Visual Studio DTE type libraries from AutoSDK, to fix accessor not working in installed builds built from licensee workspaces.

#jira UE-88791, UE-89124, UE-89162
#rb none

#ROBOMERGE-SOURCE: CL 11590477 in //UE4/Release-4.25/... via CL 11590479
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11590486 by ben marsh in Main branch]
2020-02-24 15:45:01 -05:00
ben marsh
bbce32675c UBT: Add a utility function to create an action that copies from one file to another.
#rb none
#jira
#rnx

#ROBOMERGE-SOURCE: CL 11590405 in //UE4/Release-4.25/... via CL 11590409
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11590415 by ben marsh in Main branch]
2020-02-24 15:38:58 -05:00
jon nabozny
5d42c67010 Always compile PushModel in all Editor Builds so they can be shared across projects.
Clients and Servers can still opt in via Build.cs files.


[at]Ben.Marsh, [at]Marc.Audy
#rb Ben.Marsh
#jira UE-89270


#ROBOMERGE-SOURCE: CL 11579024 via CL 11579026 via CL 11579030
#ROBOMERGE-BOT: (v654-11333218)

[CL 11579032 by jon nabozny in Main branch]
2020-02-21 16:39:20 -05:00
pierreolivier latour
f989e516fc Fixed UnrealBuildTool crashing on launch if initialization of UnrealTargetPlatform static members variables happens out of order
## Summary

`UnrealTargetPlatform` and `UnrealPlatformGroup` are partial structs which each have a static member variable declared like this:

private static UniqueStringRegistry StringRegistry = new UniqueStringRegistry();

These partial structs have additional implementations in /Engine/Platforms/XXX/Source/Programs/UnrealBuildTool/UEBuildXXX.cs, which also have static member variables declared like this:

public static UnrealTargetPlatform XXX = FindOrAddByName("XXX");

`FindOrAddByName()` is a static method on `UnrealTargetPlatform` and `UnrealPlatformGroup` which accesses `StringRegistry` and requires it to be initialized i.e. non-null.

It appears that there's no guarantee in .NET runtime that the static member variables in the "original" implementation of the partial structs will be initialized _before_ the ones from the "additional" implementations. This means `XXX` above can be initialized in the additonal implementation before `StringRegistry` has been initialized in the original implementation, which means it's still null when `FindOrAddByName()` is called so the tool crashes.

In practice, this is 100% reproducible in our public GitHub mirror when opening `UnrealBuildTool.csproj` with VisualStudio Mac. This IDE rewrites the project file which affects when / how UEBuildXXX.cs is compiled, and static member variables for these partial structs end up being initialized out or order.

The only solution I found that worked was to replace all accesses to the `StringRegistry` static member variables by a wrapper function `GetUniqueStringRegistry()` which takes care of initializing it - only once. Since all this happens while the tool launches, this code should not need to be multithread aware / re-entrant.

NOTE: There is another partial struct `RestrictedFolder` in this codebase which also use `UniqueStringRegistry` in a similar way but the 2 implementations are in the same source file, so the bug may not happen and I left the implementation untouched.

## Test Plan

- Opened `UnrealBuildTool.csproj` with VisualStudio Mac
- Built UnrealBuildTool and verified it crashed on launch due to `StringRegistry` being NULL when used by `FindOrAddByName()`
- Confirmed the crash doesn't happen anymore after applying this change and that the `StringRegistry` static member variable was only set once by `GetUniqueStringRegistry()`


#jira UE-88908
#rb ben.marsh

#ROBOMERGE-SOURCE: CL 11498874 in //UE4/Release-4.25/...
#ROBOMERGE-BOT: RELEASE (Release-4.25 -> Release-4.25Plus) (v654-11333218)

[CL 11498887 by pierreolivier latour in 4.25-Plus branch]
2020-02-18 10:03:16 -05:00
ben marsh
bf30674dbf Remove Gnmx from hard-coded list of modules that aren't IWYU compatible.
#rb none
#rnx
#jira UE-84505

#ROBOMERGE-SOURCE: CL 11433161 in //UE4/Release-4.25/...
#ROBOMERGE-BOT: RELEASE (Release-4.25 -> Release-4.25Plus) (v654-11333218)

[CL 11443939 by ben marsh in 4.25-Plus branch]
2020-02-14 10:36:16 -05:00
Rolando Caloca
5b82f15def Copying //UE4/Dev-RenderPlat-Staging@11388153 to //UE4/Main
#rb none
#rnx

[CL 11388545 by Rolando Caloca in Main branch]
2020-02-12 13:27:19 -05:00
Stefan Boberg
55a8b15f1f Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb none

[CL 11258477 by Stefan Boberg in Main branch]
2020-02-05 14:26:36 -05:00
Rolando Caloca
f63a3e857e Merging //UE4/Main@11178322 to Dev-RenderPlat-Staging
#rnx
#rb none

[CL 11195678 by Rolando Caloca in Dev-RenderPlat-Staging branch]
2020-01-31 10:34:10 -05:00
Ben Marsh
0e6aa011b3 Copying //UE4/Dev-Build @ CL 11166028 to Dev-Main (//UE4/Dev-Main)
#rb none
#rnx

[CL 11166227 by Ben Marsh in Main branch]
2020-01-29 14:48:18 -05:00
PJ Kack
ef8a7b620e AUTO MERGE
Merging //UE4/Main @ 11112898 to //UE4/Dev-Core (dev-core-l0178)

#rb none

(ushell-p4-mergedown)

[CL 11113593 by PJ Kack in Dev-Core branch]
2020-01-26 11:35:42 -05:00
PJ Kack
3a9ca4d2f9 Merging //UE4/Main @ 11112898 to //UE4/Dev-Core (dev-core-l0178)
#rb none

(ushell-p4-mergedown)

[CL 11113592 by PJ Kack in Dev-Core branch]
2020-01-26 11:33:22 -05:00
graeme thornton
5059d3cb48 Make UAT use a config setting to decide which editor target is the default for use within automation scripts
Have UBT set the source target name as a define during compilation. For unique environments, embed that macro globally, but in shared environments just embed it into game modules.
Have the primary game module bind that define to a core delegate so engine systems can query it
Make LiveCodingModule pass the UBT target name to the UBT so that it doesn't have to guess which target to build
For agnostic executables (UE4Game, UE4Editor)  running content only projects, the delegate won't be bound, so revert back to type based recompile requests in live coding
Handle DTE string for VS2019 in the source code accessor module

#rb ben.marsh


#ROBOMERGE-SOURCE: CL 11103653 via CL 11103654 via CL 11103656
#ROBOMERGE-BOT: (v640-11091645)

[CL 11103658 by graeme thornton in Main branch]
2020-01-24 03:22:33 -05:00
Michael Lentine
15cb9c40d7 Disable Chaos as default for 4.25 prep. After the creation of the 4.25 branch we will re-enable it.
#rb none
#jira nojira

[CL 11077406 by Michael Lentine in Main branch]
2020-01-21 16:57:08 -05:00
michael noland
d7901307b8 Adding preliminary support for enabling the warning C4244 ('argument': conversion from 'type1' to 'type2', possible loss of data) on a module by module basis to help catch int64->int32 and double->float / float<->int confusion
- UnsafeTypeCastWarningLevel can be set to WarningLevel.Warning or WarningLevel.Error in ModuleName.Build.cs (off by default)
- Currently only supported on MS compilers (Clang ignores the setting for now)
#jira UE-86949
#rb ben.marsh


#ROBOMERGE-SOURCE: CL 11050203 via CL 11050250 via CL 11050262
#ROBOMERGE-BOT: (v637-11041722)

[CL 11050266 by michael noland in Main branch]
2020-01-17 13:27:48 -05:00
chad garyet
7c5f99777c - add CompileChaos and -UseChaos flags
#rb ben.marsh

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: chad.garyet
#ROBOMERGE-SOURCE: CL 10995988 via CL 10996038 via CL 10996040 via CL 10996048
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v633-10983880)

[CL 11025805 by chad garyet in Dev-Core branch]
2020-01-16 01:03:05 -05:00
derek ehrman
269f7f4233 Back out changelist 10983314
re-enabling chaos in 12.00 to avoid impacting downstream ... will redo it and deadend appropriately.



[FYI] Max.Whitehead, Michael.Lentine

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: derek.ehrman
#ROBOMERGE-SOURCE: CL 10985069 via CL 10985152 via CL 10985168 via CL 10985197
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v633-10983880)

[CL 11010007 by derek ehrman in Dev-Core branch]
2020-01-15 22:07:50 -05:00