Commit Graph

140 Commits

Author SHA1 Message Date
Joe Kirchoff
b76676d7e5 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

[CL 16779820 by Joe Kirchoff in ue5-main branch]
2021-06-24 19:00:31 -04:00
Joe Kirchoff
e7351bd35b UnrealBuildTool: /sourceDependencies isn't valid for clang
#rb trivial
#rnx

[CL 16760035 by Joe Kirchoff in ue5-main branch]
2021-06-23 14:07:11 -04:00
Joe Kirchoff
74747077a5 UnrealBuildTool: Move /sourceDependencies arg to GetCompilerArguments()
#rb trivial
#rnx

[CL 16759389 by Joe Kirchoff in ue5-main branch]
2021-06-23 13:23:54 -04:00
Joe Kirchoff
69fd3e1226 UnrealBuildTool: Use /sourceDependencies to generate dependency list instead of cl-filter if the the msvc compiler version is at least 14.27
#rb Ben.Marsh
#preflight 60d34f6ea81904000181d05a

[CL 16758831 by Joe Kirchoff in ue5-main branch]
2021-06-23 12:39:54 -04:00
David Harvey
bc3c4c7db0 Fixing up Address Sanitizer on Microsoft platforms.
<BuildConfiguration>
    <bEnableAddressSanitizer>true</bEnableAddressSanitizer>

#jira UE-112891
#rb dan.phillips
#rnx

[CL 16757980 by David Harvey in ue5-main branch]
2021-06-23 11:35:42 -04:00
David Harvey
25c67e128d Add support for PDB page size override, introduced in VS2019 16.11 Preview 1.
This is used when dealing with PDB files that are over 4GB.

Use -PdbPageSize=<value> on the UBT command line, or add this to BuildConfiguration.xml:

  <WindowsPlatform>
    <PDBPageSize>32768</PDBPageSize>
  </WindowsPlatform>

Expected values are 4096 (default), 8192, 16384, 32768



Note to select an installed preview build of VS, you need to specify

  <WindowsPlatform>
    <CompilerVersion>Preview</CompilerVersion>
  </WindowsPlatform>


#rb ben.marsh
#jira UE-116910

[CL 16743860 by David Harvey in ue5-main branch]
2021-06-22 11:40:06 -04:00
jeanfrancois dube
50e5591882 UnrealBuildTool: added CppCompileEnvironment.AnalyzeStackSizeWarning to replace hardcoded value of 80K (now defaults to 300K).
Our stack size defaults to 4.7M on Windows, so allowing functions to use more stack space in favor of going through the heap.

#rb steve.robb


#ROBOMERGE-SOURCE: CL 16653849
#ROBOMERGE-BOT: (v834-16658389)

[CL 16659295 by jeanfrancois dube in ue5-main branch]
2021-06-14 11:58:20 -04:00
jonathan adamczewski
4ece24e65a AutomationTool, BuildUtilities:
UnrealBuild -> Unreal for EngineDirectory, RootDirectory, IsEngineInstalled, UnrealBuildToolPath
Remove CommandUtils EngineDirectory, RootDirectory, IsEngineInstalled - use equvalents from UnrealBuildBase.Unreal

#jira none

[CL 16648181 by jonathan adamczewski in ue5-main branch]
2021-06-11 18:20:44 -04:00
jonathan adamczewski
b646b726e0 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

[CL 16616339 by jonathan adamczewski in ue5-main branch]
2021-06-09 19:45:07 -04:00
jonathan adamczewski
94b14ee042 UnrealBuildTool: move some path constants into BuildUtilities
RootDirectory, EngineDirectory, UnrealBuildToolPath are now found in BuildUtilities' UnrealBuild namesapce.

The way these are computed has changed. Previously, it was assumed that the application is UnrealBuildTool, and paths were constructed relative to that assembly.

Now, the assumption is that the process is located under a "Engine/Build/DotNET" sub-path and paths are constructed relative to that.

#jira none

[CL 16607440 by jonathan adamczewski in ue5-main branch]
2021-06-09 12:54:42 -04:00
jonathan adamczewski
44a6d5481e Move FileItem and DirectoryItem into BuildUtilities
#jira none

[CL 16596289 by jonathan adamczewski in ue5-main branch]
2021-06-08 19:05:33 -04:00
Joe Kirchoff
9879d7f52d UnrealBuildTool: Support VS2022 Preview
Default is still VS2019, running `GenerateProjectFiles.bat -2022` will create a solution and projects that pass -2022 to UnrealBuild tool when compiling from Visual Studio to force it to use the 2022 toolchain.
Please note, as the defaults are unchanged building from UnrealGameSync will still compile with VS2019 so I would disable that build if testing VS2022.
None of this is necessary to use VS2022, it can open VS2019 solutions and will use the Vs2019 toolchain to build.

#rb Ben.Marsh
#pf 60aebccd7d4b9f0001197729

[CL 16478477 by Joe Kirchoff in ue5-main branch]
2021-05-26 19:58:10 -04:00
Joe Kirchoff
75edf837e1 Remove build support for Visual Studio 2015
#rb Jonathan.Adamczewski
#preflight 60ad7f3b8194e700015e1d77

[CL 16459038 by Joe Kirchoff in ue5-main branch]
2021-05-25 20:10:26 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
David Harvey
b2493bdc31 Only set Clang Windows target for Windows.
#jira UECON-528
#rb eric.mcdaniel
#rnx

[CL 16140861 by David Harvey in ue5-main branch]
2021-04-28 04:45:51 -04:00
Ben Marsh
497f931a3e Fix dependency checking for PCHs on Clang. Clang was configured to generate PCHs but not to consume them - though ultimately uses them anyway due to automatic translation of -include options.
#rb none
#jira UE-114247

[CL 16117674 by Ben Marsh in ue5-main branch]
2021-04-26 15:30:33 -04:00
branden turner
3b4e6f4bc8 Fix for warning LNK4075 : Ignoring /INCREMENTAL due to /RELEASE or /OPT:ICF in HoloLens and Windows builds
#jira UE-113847
#fyi Joe.Kirchoff
#fyi Ben.Marsh
#rb none

[CL 16065453 by branden turner in ue5-main branch]
2021-04-20 16:03:23 -04:00
Ryan Durand
087db0aa2a Fix incorrect preferred max version for VC toolchain and add Cpp20 standard as supported.
#rnx
#rb ben.marsh
#jira UE-111703

[CL 15914755 by Ryan Durand in ue5-main branch]
2021-04-05 08:31:12 -04:00
halfdan ingvarsson
88a3296353 Disable pragma-pack warnings globally with Clang on Windows. CL 1586136 fixed unbracketed warning push/pop for clang which uncovered this warning.
# See discussion on https://stackoverflow.com/questions/52865610/suppressing-warning-about-pragma-pack-in-included-file

#jira none
#rb ben.marsh
#rnx

[CL 15880121 by halfdan ingvarsson in ue5-main branch]
2021-03-31 15:36:19 -04:00
halfdan ingvarsson
f4d7dbac20 Sync clang's compatibliity flag with the actual MSVC toolchain version.
#jira none
#rnx

[CL 15860687 by halfdan ingvarsson in ue5-main branch]
2021-03-30 09:04:37 -04:00
halfdan ingvarsson
a19838492a Update C++17 (and C++20) support for all platforms that were missing from CL 15801501.
#jira none
#rb brandon.schaefer
#rnx
#preflight 605b8507e8944a0001f3441d

[CL 15810185 by halfdan ingvarsson in ue5-main branch]
2021-03-24 18:11:38 -04:00
halfdan ingvarsson
596f696306 Update ASan support for MSVC 16.9 by disabling explicit linking of support libraries.
Also fixed the flag format, for consistency, now that they support the '/' variant for it, which early builds didn't.

#jira none
#rb Ben.Marsh
#rnx

[CL 15762811 by halfdan ingvarsson in ue5-main branch]
2021-03-22 11:01:22 -04:00
Ben Marsh
d2af06bed6 Fix support for C++20 modules.
#rb none
#rnx
#preflight 604a88b003c5190001d96f42

[CL 15681675 by Ben Marsh in ue5-main branch]
2021-03-11 18:03:43 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
halfdan ingvarsson
9a3fb45cb4 UBT: Add support for ASan on Windows for MSVC versions that support it.
Note that up until VS 16.9, according to the MSVC blog, ASan requires explcit helper libraries to be added to the linker line, which requires knowledge of what type of CRT we're compiling with on the link side.

#jira UE-70239
#rb Ben.Marsh

[CL 15574618 by halfdan ingvarsson in ue5-main branch]
2021-03-02 17:55:40 -04:00