Commit Graph

164 Commits

Author SHA1 Message Date
Josh Adams
b0e4357576 - UBT Code changes to remove 32-bit Windows support (C++ code for 32-bit still exists)
#rb marc.audy (concept, not each file)

[CL 15265424 by Josh Adams in ue5-main branch]
2021-01-31 15:09:58 -04:00
Ben Marsh
a64d4b7ec6 Bump minimum required VS2019 version to 16.4 (MSVC version 19.24)
#rb none
#jira UE-106449
#rnx

[CL 15146584 by Ben Marsh in ue5-main branch]
2021-01-20 14:18:47 -04:00
Ben Marsh
973c5cbd7b Remove VS2017 as a supported compiler by default. Can still be overridden with the -2017 argument, but will not be maintained from this point onwards.
#rb none

[CL 15138832 by Ben Marsh in ue5-main branch]
2021-01-19 16:23:00 -04:00
Josh Adams
700dc86148 - Improved Windows SDK detection - moved functionality from UEBuildWindows.cs to MicrosoftPlatformSDK.cs so Turnkey "installed sdk" uses the same function that UBT will use to choose the SDK from a list of preferred SDKs, with fallbacks to other locations.
- Windows allows for any SDK to be used without updating Env vars, etc, so we don't really need a strict single "InstalledVersion" - we dynamically choose a version every run of UBT, and now Turnkey will match this logic
- Added device detection to Turnkey for Windows
#rb david.harvey,chris.waters

[CL 14995008 by Josh Adams in ue5-main branch]
2021-01-05 17:06:07 -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
1e9946779e UBT: Fix up a few more nullable references.
#rb none
#rnx

[CL 14960616 by Ben Marsh in ue5-main branch]
2020-12-20 20:07:40 -04:00
Ben Marsh
83f27d27e9 UBT: Mark platforms and project file generation code as not nullable aware.
#rb none
#rnx

[CL 14960496 by Ben Marsh in ue5-main branch]
2020-12-20 17:32:59 -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
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
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
geoff evans
bcb5d9ed4e Add exception handler for building without visual studio installed on windows (clang).
#jira UE-99919
#rb trivial

[CL 14357669 by geoff evans in ue5-main branch]
2020-09-21 14:01:00 -04:00
Ben Marsh
57d9b51398 Initial support for C++20 modules.
Requires Visual Studio 2019 15.8 Preview 3, and targets to specify bEnableCppModules = true. Unsupported on other compilers.

Notes:
- Module interfaces need to be placed in .IXX files.
- Module/module dependencies are determined by a post-makefile/pre-build scan of all module interfaces using the compiler, and cause additional prerequisites to be inserted into the dependency graph before execution.
- Available module IFC search paths use normal UE module dependency rules.
- Header units are not currently supported.
- Regular C++ files cannot currently implement functions defined in module interfaces, due to the macros force included by UBT. These macros need to be placed in the global module fragment, but declaring a global module fragment must be done from the translation unit being compiled (making force-included headers invalid).

#rb none

[CL 14354539 by Ben Marsh in ue5-main branch]
2020-09-20 15:04:30 -04:00
geoff evans
13d705fba1 Profiler updates
1) Fix Visual Studio Profiling PerfAPI build script pathing for modern era of Visual Studio, add IDEDir to UBT for base path of PerfAPI lib/headers

2) Add initial support for Superluminal instrumentation API, if it's installed and -Superluminal is passed on the command line. Dial back color saturation a bit to go easier on the eyes (my eyes!!). This is WIP support, we are technically violating the API rules by feeding in changing strings to the same profile marker. So, with this change you can see the instrumentation markers in the timeline, but using all the event features in Superluminal causes weird artifacts like event strings changing as you use profiler features. Subsequent change will attempt to pry apart static and instance string data in the instrumentation, as this is a common trope across profilers (and non-PC platforms).

Updated FExternalProfiler API to forward along color information from the instrumentation. This is a minor breaking change as it's very unlikely there are direct callers of these APIs.

[CL 14321510 by geoff evans in ue5-main branch]
2020-09-15 14:26:08 -04:00
Ben Marsh
486408b1a9 Rename UE5Editor to UnrealEditor.
#rb none
#jira UE-97600

[CL 14292067 by Ben Marsh in ue5-main branch]
2020-09-10 15:39:00 -04:00
Ben Marsh
be7034ec27 Rename UE4Editor to UE5Editor, and generated solution/projects from UE4 -> UE5.
UE4Game/Client/Server targets left intact for the time being.

#rb none

[CL 14288076 by Ben Marsh in ue5-main branch]
2020-09-10 09:10:30 -04:00
Marc Audy
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Josh Adams
8e4048e6ee - Moved Platform SDK classes to their own files to prepare for moving to BuildUtilities
- Deleted some empty subclasses
#fyi ben.marsh

[CL 13736834 by Josh Adams in ue5-main branch]
2020-06-22 16:48:32 -04:00
Josh Adams
ab4a48f566 - Moved UEBuildPlatformSDK into a separate DLL, BuildUtilities (similar to DotNETUtilities), allowing for better sharing of code between UBT and UAT (Turnkey in particular)
- Refactored SDK versioning into more formalized APIs for all platforms. Currently UBT will not error with bad versions, but that is coming.
- Turnkey updated to use new BuildUtilities
#rb ben.marsh

[CL 13733158 by Josh Adams in ue5-main branch]
2020-06-22 14:32:25 -04:00
Josh Adams
d04b198d32 - Removed Win32 from being referenced in:
- BuildScripts so builders won't compile it
  - UBT platform registration and from being registered in UBT (so it won't show up in VS)
  - PlatformInfo (so it can't triggered from Package/Launch On)
#rb ben.marsh

[CL 13546702 by Josh Adams in ue5-main branch]
2020-05-26 12:07:45 -04:00
Josh Adams
ccc1743281 - Big TargetPlatform Module cleanup:
- Removed the function to return a single TP, and wrapped the functionality in a simple single required function (platform just has to add TPs to an array, high level code manages init and cleanup of the array)
  - Stripped unncessary code from all TPs
  - Collapsed the desktop targetplatform modules into 1 per platform
  - Renamed LinuxAArch64NoEditorTargetPlatfortm to LinuxAArch64TargetPlatform to match the other non-editor platforms
  - Deleted AllDesktopPlatform

[CL 13502803 by Josh Adams in ue5-main branch]
2020-05-22 09:57:29 -04:00
Ryan Durand
e3665d1269 Adding toolchain test builds.
#rnx
#rb ben.marsh
#jira UE-91215

[CL 12972250 by Ryan Durand in Main branch]
2020-04-21 22:15:27 -04:00
Ben Marsh
d6d7c939e5 Copying //UE4/Dev-Build to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 12726184 by Ben Marsh in Main branch]
2020-04-10 11:30:32 -04:00
ben marsh
456f9a9ca7 Add support for different analysis modes in the PVS toolchain.
Defaults to just using general analysis (which UE4 builds cleanly with), but other options can be configured by setting TargetRules.WindowsPlatform.PVS.ModeFlags or by setting TargetRules.WindowsPlatform.PVS.UseApplicationSettings = true to read from the PVS config file.

Based on PR #6730.

#rb none
#jira UE-89664

#ROBOMERGE-SOURCE: CL 12496329 in //UE4/Release-4.25/... via CL 12496331 via CL 12496343
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12496355 by ben marsh in Main branch]
2020-03-31 09:54:21 -04:00