Commit Graph

831 Commits

Author SHA1 Message Date
Ben Marsh
7047e080af UBT: Rename IAction to IExternalAction, to distinguish it from actions which only exist within UBT.
#rb none
#rnx

[CL 14823490 by Ben Marsh in ue5-main branch]
2020-11-30 16:58:32 -04:00
Ben Marsh
c4683ec94b UBT: Fix PVS studio static analysis steps not preprocessing source files before analysis.
#rb none
#rnx
#jira UE-103715

[CL 14815927 by Ben Marsh in ue5-main branch]
2020-11-26 10:57:09 -04:00
Ben Marsh
d90e347e32 UBT: Remove PVS studio dependencies on IAction.PrerequisiteItems, in preparation for them being computed by an async process.
#rb none
#rnx

[CL 14815895 by Ben Marsh in ue5-main branch]
2020-11-26 10:31:22 -04:00
Joakim Lindqvist
8120c1f2e0 Changed the dsym generation to write a .sh file instead of running this rather complicated logic as a in line script. Resolves issues with escaping this complicated one line script in net core.
#rb ben.marsh

[CL 14815621 by Joakim Lindqvist in ue5-main branch]
2020-11-26 06:33:42 -04:00
Ben Marsh
96c997d826 UBT: Move logic for building response files and generating inputs and outputs for MSVC compilation into the VCCompileAction class.
#rb none
#rnx

[CL 14812826 by Ben Marsh in ue5-main branch]
2020-11-25 10:19:33 -04:00
Marc Audy
b670076b10 Copyright fixups
#fyi Ben.Marsh

[CL 14811501 by Marc Audy in ue5-main branch]
2020-11-24 19:17:04 -04:00
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -04:00
Ben Marsh
8d1f11d053 UBT: Start to move Windows specific compile functionality into the VCCompileAction class.
#rb none
#rnx

[CL 14810985 by Ben Marsh in ue5-main branch]
2020-11-24 17:48:38 -04:00
Ben Marsh
25a42f8613 UBT: Add a custom compile action for Visual C++.
#rb none
#rnx

[CL 14810803 by Ben Marsh in ue5-main branch]
2020-11-24 16:24:58 -04:00
Ben Marsh
b598d6ffd8 UBT: Remove Action.bPrintDebugInfo. This is no longer read by anything.
#rb none
#rnx

[CL 14810786 by Ben Marsh in ue5-main branch]
2020-11-24 16:15:02 -04:00
Ben Marsh
74732c7177 UBT: Convert a few more direct references to the Action class to IAction interfaces.
#rb none
#rnx

[CL 14810700 by Ben Marsh in ue5-main branch]
2020-11-24 15:42:08 -04:00
Ben Marsh
29bfdd417f UBT: Allow actions to implement custom serialization methods, and store abstract interfaces for actions in the makefile.
#rb none
#rnx

[CL 14810441 by Ben Marsh in ue5-main branch]
2020-11-24 14:37:31 -04:00
halfdan ingvarsson
293b13cba5 Add CA_* macro support for the clang static analyzer in WindowsPlatformCodeAnalysis.h
Fixed the condition in Tuple.h to not include the MSVC static analyzer workaround when using the clang static analyzer.
Added a special flag in UBT to instruct clang to properly set the __clang_analyzer__ macro during static analysis.

#rb Marc.Audy, Ben.Marsh
#jira none
#rnx

[CL 14807991 by halfdan ingvarsson in ue5-main branch]
2020-11-23 18:08:03 -04:00
Ben Marsh
0e95359692 UBT: Remove the DistCC executor. We don't maintain this any more.
#rb none

[CL 14807528 by Ben Marsh in ue5-main branch]
2020-11-23 15:53:51 -04:00
Ben Marsh
9368a89d72 UBT: Add utility class for caching MSVC predefined macros.
#rb none
#rnx

[CL 14807145 by Ben Marsh in ue5-main branch]
2020-11-23 14:13:08 -04:00
halfdan ingvarsson
b1d3d7ab1c Add support for enabling the clang static analyzer on Windows when using the clang compiler.
The clang static analyser is arguably a lot more powerful tool than either PVS or the MSVC, and gives detailed information how how it arrived at its conclusion, unlike the other two (example listed below).

Changed the WindowsStaticAnalyzer.VisualCpp enum to alias to a new entry, WindowsStaticAnalyzer.Default, which picks the default static analysis tool for the given working compiler.

Presently, only a subset of checkers is enabled. As of this CL, the analyzer reports a huge amount of issues, some of which are benign (such as knowingly de-referencing shared pointers when we're sure they're valid, although those could benefit from being changed to shared refs) and some real bugs, for example calls to virtual functions from constructors/destructors, memory leaks in Slate and what looks like a really tricky, potential free-after-use issue with TSharedRef.  Until some of those issues are resolved, I wouldn't recommend enabling this as a analysis pass in lieu of MSVC or PVS. It can be run selectively on individual files for now, however.

Example output:
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(85,4): warning: Potential leak of memory pointed to by 'SavedIndices' [cplusplus.NewDeleteLeaks]
                          LogSlateD3DRendererFailure(TEXT("FSlateD3DIndexBuffer::ResizeBuffer() - ID3D11Device::CreateBuffer"), Hr);
                          ^
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(45,6): note: Assuming 'NumIndices' is > field 'MaxNumIndices'
          if( NumIndices > MaxNumIndices )
              ^~~~~~~~~~~~~~~~~~~~~~~~~~
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(45,2): note: Taking true branch
          if( NumIndices > MaxNumIndices )
          ^
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(53,19): note: Memory is allocated
                          SavedIndices = new uint8[MaxNumIndices*sizeof(SlateIndex)];
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(68,7): note: Assuming 'Hr' is < 0
                  if (SUCCEEDED(Hr))
                      ^~~~~~~~~~~~~
  C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared\winerror.h(28788,24): note: expanded from macro 'SUCCEEDED'
  #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
                         ^~~~~~~~~~~~~~~~~~~~
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(68,3): note: Taking false branch
                  if (SUCCEEDED(Hr))
                  ^
  E:\dev\ue5_main1\Engine\Source\Developer\StandaloneRenderer\Private\Windows\D3D\SlateD3DIndexBuffer.cpp(85,4): note: Potential leak of memory pointed to by 'SavedIndices'
                          LogSlateD3DRendererFailure(TEXT("FSlateD3DIndexBuffer::ResizeBuffer() - ID3D11Device::CreateBuffer"), Hr);
                          ^

#rb Ben.Marsh
#jira none
#rnx

[CL 14765788 by halfdan ingvarsson in ue5-main branch]
2020-11-17 16:28:25 -04:00
Joakim Lindqvist
4aa9d3dddf Hololens fixes in UBT and UAT under netcore
This was using net framework specific apis, found corresponding apis under net core and switched to them.

#jira UE-103000

[CL 14763785 by Joakim Lindqvist in ue5-main branch]
2020-11-17 11:43:58 -04:00
Josh Adams
e90261a073 - Added support for finding Windows SDK on builders that don't have the SDK installed - but might have the SDK bits coming from AutoSDK location
#rb me
#jira UE-102459
#fyi ryan.durand

[CL 14666936 by Josh Adams in ue5-main branch]
2020-11-05 14:16:11 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
Ryan Durand
16fa746ec6 Fixing the path to the dummy workspace in the IOS tool chain.
#rnx
#rb none
#jira none

[CL 14562879 by Ryan Durand in ue5-main branch]
2020-10-23 16:38:09 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Ben Marsh
7bb8c4ae95 UBT: Support for module partitions. Also rework dependency mapping to handle modules in files in files with different names.
#rb none

[CL 14520558 by Ben Marsh in ue5-main branch]
2020-10-19 22:32:26 -04:00
Josh Adams
df33c7885f - Added file logging to GenerteProjectFiles (saved to Engine/Programs/UnrealBuildTool/Log_GPF.txt)
- Improved GPF's SDK error printouts, with no more red error text, and just a list of bad platform SDKs, and a link to the log file to get the detailed information if desired
#rb ben.marsh

[CL 14475783 by Josh Adams in ue5-main branch]
2020-10-12 18:14:03 -04:00
Ben Marsh
7932350c0a Do not fall back to choosing VS2017 toolchain if a specific 2019 version is not found.
#rb none

[CL 14474210 by Ben Marsh in ue5-main branch]
2020-10-12 15:28:41 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00