Commit Graph

179 Commits

Author SHA1 Message Date
josh adams
1610c3bee3 UnrealArch/UnrealArchitectures changes
- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects
 - UnrealArch is a single architecture, expandable enum-like struct
 - There is no more concept of "no/default architecture", there is always a valid active architecture when building
 - Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not
 - UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc)
 - UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm)
 - TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once)
 - Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc)

#preflight 63c81fb5b065224750a1759e
#rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts]
#p4v-preflight-copy 23562471

[CL 23829977 by josh adams in ue5-main branch]
2023-01-24 09:30:28 -05:00
Joe Kirchoff
24ebcdfb1d UnrealBuildTool: Support msvc analyzer extensions
Enable by setting ModuleRules.bStaticAnalyzerExtensions = true.

It is recommended to use ModuleRules.StaticAnalyzerRulesets to filter the warnings that are reported as this will enable a large number of additional warnings.

Please see the following links for more details:
https://learn.microsoft.com/en-us/cpp/code-quality/using-the-cpp-core-guidelines-checkers
https://learn.microsoft.com/en-us/cpp/code-quality/using-rule-sets-to-specify-the-cpp-rules-to-run

#jira UE-174521
#rb trivial
#preflight 63c9e333977c626356cdf40f

[CL 23784396 by Joe Kirchoff in ue5-main branch]
2023-01-19 19:46:12 -05:00
christopher waters
552f2a9ca0 RHI header reorganization
- Changing RHIUtilities, RHIContext, RHICommandList and DynamicRHI to get them to compile independently of the rest of the RHI headers.

#preflight 63c1e22c2e714f64ad46aae5

[CL 23697282 by christopher waters in ue5-main branch]
2023-01-14 00:23:40 -05:00
christopher waters
c8fb19a8de IWYU iteration changes
- Adding -IWYUHeadersOnly command line option to restrict IWYU to just header files
- Adding IWYU support for -Module=XXX

#rb henrik.karlsson
#preflight 63c05f7e1a06fc61057cf347

[CL 23670631 by christopher waters in ue5-main branch]
2023-01-12 17:29:36 -05:00
bob tellez
971983eb65 [Backout] - CL23624045
[FYI] christopher.waters
Original CL Desc
-----------------------------------------------------------------
RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631957 by bob tellez in ue5-main branch]
2023-01-10 15:28:15 -05:00
christopher waters
3df5dae685 RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631946 by christopher waters in ue5-main branch]
2023-01-10 15:27:33 -05:00
henrik karlsson
31c48b294e [UBT]
* Fixed new iwyu code to be compatible with changes coming from ue5 main (CompileCppFiles is now protected and UEBuildModuleCPP.cs calls CompileAllCPPFiles instead of CompileCppFiles directly)

#preflight skipped
#rb none
#jira none

[CL 23631280 by henrik karlsson in ue5-main branch]
2023-01-10 14:56:25 -05:00
henrik karlsson
23ea716c7a [UBT]
* Added IWYU toolchain which can be enabled with -IWYU
* Added IWYU mode that can be used with -Mode=IWYU. This can be used to modify code files
* Binary of include-what-you-use that contains a ton of fixes to make ue build

#preflight skipped
#rb joe.kirchoff

[CL 23631202 by henrik karlsson in ue5-main branch]
2023-01-10 14:52:00 -05:00
henrik karlsson
20ad69e0f1 [UnrealBuildTool]
* Fixed log warning to show correct data (and is now copy-pastable)

#rb joe.kirchoff
#preflight skipped

[CL 23605571 by henrik karlsson in ue5-main branch]
2023-01-06 18:57:13 -05:00
henrik karlsson
c6f15b80c3 [UnrealBuildTool]
* Added code to fixup definitions provided through .build.cs files. There are actually strict rules around the syntax of defines (reading msvc documentation). There should be no space before or after the '=' character. so "MY_DEFINE = 1" is actually invalid. When building with header units this actually produce invalid data but in normal builds it seems to swallow it (even though the documentation says it shouldn't)

I would have wanted to fix the code producing bad definition format but it is in a whole bunch of modules so I suspect external teams might have this too, so instead we fix it up by trimming the strings before and after '='

#preflight 63b894b9221aab21e0970eb0
#rb none

[CL 23605565 by henrik karlsson in ue5-main branch]
2023-01-06 18:56:54 -05:00
Josh Adams
b337b06556 - Allow for a platform to compile for multiple architectures, and have the high-level compile separately, and then link not separately (this means we can't use the one-target-per-architecture stuff that is already present)
- Mac changes to compile separately,  but link together (with lipo) after making two .dylibs/executables
- Removed FixDylibDependencies on Mac by making "stub dylibs" to mimic what Windows does with import libs, to solve circular dependencies
- Added DependenciesToSkipByArchitecture to ModuleRules that is used, when making a new single-arch LinkEnvironment from a multi-arch LinkEnvironment, to strip out libraries, etc, that should not be included with that single architecture
#preflight 6387891b4004f73f623c85a0
#rb zack.neyland

[CL 23336522 by Josh Adams in ue5-main branch]
2022-11-30 13:38:45 -05:00
bryan sefcik
ac642e3ace Updated to disable XGE and SNDBS when profiling.
Added a flag that turns off module unity size overrides.

#jira
[FYI] joe.kirchoff
#preflight 637673ccaf52be152449722a

[CL 23182588 by bryan sefcik in ue5-main branch]
2022-11-17 15:29:33 -05:00
Rafa Lecina
df001c1d21 Support enable ARC in modules
#jira UE-107891
#review @Sam.Zamani @Bertrand.Carre @Chris.Varnsverry @Roman.Dzieciol @Josh.Adams  @Jack.Porter
#preflight

[CL 23133821 by Rafa Lecina in ue5-main branch]
2022-11-15 06:02:36 -05:00
bryan sefcik
d464a46b31 Reorganized the unity logic to take into account the generated cpp files when determining whether to use unity files. Previously the logic wouldn't take into account the number of generated files which meant that modules that had just generated cpp files wouldn't use unity files.
Before:
Unity Files: 6759
Total CPU Time: 77035.734375 s
Total time in Parallel executor: 2062.95 seconds

After:
Unity Files: 6656
Total CPU Time: 76182.40625 s
Total time in Parallel executor: 2047.47 seconds

#jira
[FYI] joe.kirchoff
#preflight 637273a1ee4d25f90acc3712

[CL 23123139 by bryan sefcik in ue5-main branch]
2022-11-14 14:15:09 -05:00
chris constantinescu
7859a6cdb4 Catch2 feature introduced: test groups and group events at global, group and test group before/after levels
#preflight 636ab505450be1d9f83e90e4
#rb Jerome.Delattre

[CL 23039159 by chris constantinescu in ue5-main branch]
2022-11-08 16:02:46 -05:00
joe kirchoff
4bd342fb6c UnrealBuildTool: BuildSetting.V3 (currently disabled) which disallows adding module parent directory to include path list
#rnx
#rb bryan.sefcik
#preflight 634df3105f008d633fd571d2

[CL 22798627 by joe kirchoff in ue5-main branch]
2022-10-26 19:13:07 -04:00
joe kirchoff
20c19d6503 [Backout] - CL22754728
[FYI] Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
UnrealHeaderTool: BuildSetting.V3 (currently disabled) which disallows adding module parent directory to include path list

#rnx
#rb bryan.sefcik
#preflight 634df3105f008d633fd571d2

[CL 22795918 by joe kirchoff in ue5-main branch]
2022-10-26 18:18:06 -04:00
joe kirchoff
6e28fec987 UnrealHeaderTool: BuildSetting.V3 (currently disabled) which disallows adding module parent directory to include path list
#rnx
#rb bryan.sefcik
#preflight 634df3105f008d633fd571d2

[CL 22793005 by joe kirchoff in ue5-main branch]
2022-10-26 17:30:50 -04:00
henrik karlsson
19a8eac8c1 [UBT]
* Fixed bug where name collision happened if both VNI and UHT files were created for same file

Fixes VerseExample UBT exception

#rb none
#preflight none

[CL 22783396 by henrik karlsson in ue5-main branch]
2022-10-26 13:07:08 -04:00
bryan sefcik
a86a03522d Added a bool setting to allow us to turn off the forcing of PCH files for gen.cpp files when PCH is disabled. This improves NoPCH/DisableUnity compile times.
#jira
#preflight 63518daf3d41a4455a3de844

[CL 22677159 by bryan sefcik in ue5-main branch]
2022-10-20 20:09:31 -04:00
henrik karlsson
a72cec4bbc [UnrealBuildTool]
* Added support for forcing module to use inlined .gen.cpp files

#rb joe.kirchoff
#preflight skipped

[CL 22673962 by henrik karlsson in ue5-main branch]
2022-10-20 17:53:32 -04:00
bryan sefcik
3c6a04fdf6 Fixed an issue where SNDBS would fail to compile files on agents because the inlined gen.cpp files were not setup as prerequisites.
#rb joe.kirchoff

[CL 22464949 by bryan sefcik in ue5-main branch]
2022-10-11 16:49:17 -04:00
Robert Millar
a677dbc70e Allow disabling all static analysis on a module.
#rb joe.kirchoff
#jira none
#preflight https://horde.devtools.epicgames.com/job/6340540e174b13865728ca7c

[CL 22403984 by Robert Millar in ue5-main branch]
2022-10-07 13:30:19 -04:00
bryan sefcik
2a23602913 Fixed an issue the BF was seeing with compiling non-unity builds that use the inline gen.cpp macro.
#preflight 6330d4e3d747fe52c8739b78

[CL 22177396 by bryan sefcik in ue5-main branch]
2022-09-25 19:36:22 -04:00
joe kirchoff
03ac9fef1e UnrealBuildTool: Fix another instance where all writable source files would incorrectly add many files to the adaptive working set
#jira UE-163272
#rnx
#rb trivial
#preflight 632defa4d51603c548982fbe

[CL 22165269 by joe kirchoff in ue5-main branch]
2022-09-23 20:44:32 -04:00