Commit Graph

248 Commits

Author SHA1 Message Date
tim smith
d790b6cc5a Fixed UBT log event level check that resulted is massive spam to the logger.
#rb josh.adams
#preflight 6419c7b93f3d31c94a042007

[CL 24734531 by tim smith in ue5-main branch]
2023-03-21 13:15:39 -04:00
Ben Marsh
7e26c34d2b EpicGames.Core: Deprecate legacy log methods to prefer structured logging interface.
#preflight 640a23d928026468d9de7cbd

[CL 24580590 by Ben Marsh in ue5-main branch]
2023-03-09 14:51:40 -05:00
josh adams
4d71aa084a - Fixed .precompiled file location to be architcture independent
- Added IntermediateDirectoryNoArch to UEBuildModule (we can use this in the future to put generated definitions headers, which can help reduce rebuilds going between multi- and single-arch)
#rb Joe.kirchoff
#jira UE-178211,UE-178589
#preflight 63fd3cb72b1a2765f9a46322

[CL 24441385 by josh adams in ue5-main branch]
2023-02-28 09:01:08 -05:00
Tim Smith
e203b191fb Fix for changed container error during project file generation.
#rb self
#rnx
#preflight 63ee377c956709374a42dc74

[CL 24257248 by Tim Smith in ue5-main branch]
2023-02-16 09:31:40 -05:00
bryan sefcik
592942fad7 Added support for Clang PCH chaining
https://clang.llvm.org/docs/PCHInternals.html#chained-precompiled-headers

Linux - EngineTestEditor -allmodules
Before:
Total PCH Size: 3.41 GB

After:
Total PCH Size: 2.65 GB

#jira
#rb joe.kirchoff
#preflight 63e57da9636f66aac7dc1818

[CL 24114121 by bryan sefcik in ue5-main branch]
2023-02-09 22:37:30 -05:00
henrik karlsson
5f74d114d5 [UBT]
Changed how single files are built. We don't want to invalidate makefile everytime we build single files since it destroys turnaround times. With this change a single file compile can take 2s (+ the actual compile time).

The new behavior injects a special action per module when creating the makefile. These actions can be used to on-the-fly create a proper compile action that follows the rules of the module that the specific file belongs to.. In a normal build these actions are ignored since the logic deciding which actions to build is backtraced from which binaries we want to create.

When a specific file compile is triggered, the logic deciding which files to build search up all these special actions and create a lookup based on which folders the special actions handle. It then try to find the special action that handles the specific file. The matching special action then creates a compile action that can handle that specific file and then queue up the action for execution. If no special action is found it falls back to try to use actions that have this specific file as input (ispc files for example)

Details:
* Removed lots of custom code for "specific files" handling
* Changed so pch (both private and shared) always use definition file. Added #pragma once and change so pch wrapper file include definition file. This made the adaptive path and specific file easy to implement (just disable pch in compile environment and it will just work)
* Added SingleFileAction for both VCToolChain and ClangToolChain. It now works to compile specific headers and cpp files. (It creates wrapper files on the fly to be able to compile all header files (compiling headers directly blow up if there are circular includes)
* Fixed so GenerateClangDatabase mode works with new changes
* Moved the logic that makes sure all (directly) depending cpp files are recompiled when .h are included in the singlefile option

#preflight 63dcc46f78716a01e8069649
#rb joe.kirchoff

[CL 24094027 by henrik karlsson in ue5-main branch]
2023-02-09 04:20:43 -05:00
henrik karlsson
c6787926bd [UBT]
* Minor optimizations based on superluminal profiling information

#preflight 63d860d77a39a180218b2490
#rb joe.kirchoff

[CL 23924068 by henrik karlsson in ue5-main branch]
2023-01-31 01:28:40 -05:00
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
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
Rafa Lecina
4e08b2ba53 Add support for XCFramework to UBT on iOS
#jira UE-168983
#review-23009903 @Sam.Zamani @Bertrand.Carre @Chris.Varnsverry @Roman.Dzieciol @Josh.Adams @Jack.Porter
#preflight

[CL 23133403 by Rafa Lecina in ue5-main branch]
2022-11-15 04:20:41 -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
5c0f624150 [UnrealBuildTool]
* Added module type to json output

#preflight skip
#rb joe.kirchoff

[CL 22361510 by henrik karlsson in ue5-main branch]
2022-10-05 15:35:28 -04:00
UnrealBot
73409369c0 Branch snapshot for CL 21319338
[CL 21319338 in ue5-main branch]
2022-08-10 16:03:37 +00:00
Ben Marsh
cbb950c578 UBT: Use ILogger throughout UBT, rather than legacy EpicGames.Core.Log methods. All output going forwards should use structured logging rather than String.Format style logging.
#preflight 628e9dc6e746de4961f60032

[CL 20373777 by Ben Marsh in ue5-main branch]
2022-05-25 19:55:37 -04:00
chris constantinescu
1278a26f76 Low level tests further refactoring and test resource deployment
#preflight 626955ed0d4ac78d716eacf0
#rnx

[CL 19941830 by chris constantinescu in ue5-main branch]
2022-04-27 12:36:35 -04:00
chris constantinescu
28111d40fc Redundancy cleanup in UBT Low Level Tests:
- test-specific targets and modules are constructed by RulesAssembly which removes a lot of spaghetti code
- no more excluding the Tests folder by default which is guaranteed to mislead users #fyi Jon.Nabozny
- test compilation in Tests is controlled through WITH_LOW_LEVEL_TESTS
- preparation code for switching tests between Catch2 / TestAutomation Fmwk

Nightly LLT PF 6260431391376845adeb4c40

#rnx
#preflight 62602d50dd47b4ad2173c30b

[CL 19834665 by chris constantinescu in ue5-main branch]
2022-04-20 14:24:59 -04:00
jonathan adamczewski
d4f03243e3 Remove various obsolete (deprecated) items in C# code
#jira none
#trivial
#rnx
#preflight 625a32bbde3638cefa4106cb

[CL 19786027 by jonathan adamczewski in ue5-main branch]
2022-04-18 11:27:53 -04:00
jonathan adamczewski
0a6164bbd3 nullability annotations, rethrow fixes, net6.0 warning suppression
#jira none
#trivial
#rnx
#preflight 62425155c61d8a458f230657

[CL 19536049 by jonathan adamczewski in ue5-main branch]
2022-03-28 20:50:06 -04:00
jonathan adamczewski
5c68d1d9ef Revert //UE5/Main/... changelist 19531725 - return to NET Core 3.1
#preflight 62422fd0470aff98e946bfce
#jira UE-119846

[CL 19534572 by jonathan adamczewski in ue5-main branch]
2022-03-28 18:25:19 -04:00
jonathan adamczewski
18ac15cbb1 Upgrade to .NET 6.0
#jira UE-119846
#preflight 6241fc06470aff98e943c035

[CL 19531725 by jonathan adamczewski in ue5-main branch]
2022-03-28 15:30:56 -04:00
chris constantinescu
55e80d2462 Test Mode: boolean flag on ModuleRules class that allows including Tests folder into non-test builds.
#rnx
#preflight 61eb1ea5731e3b40889eaece

[CL 18697083 by chris constantinescu in ue5-main branch]
2022-01-21 16:53:29 -05:00
chris constantinescu
8c968941f9 UBT TestMode that allows building a test executable for an associated target.
- Each module can now have a Tests folder at its root containing low level tests written with Catch2
- Used like this: UnrealBuildTool.exe -Mode=Test TargetName Platform Configuration
- It creates a test executable that's associated with the specified build Target and it includes all the tests for the Target AND all its dependencies as well
- When building without -Mode=Test it will omit the Tests folder contents from compilation: in theory we never allowed folders named Tests at the root of modules, but there might be isolated exceptions where we didn't validate folder names - in this case we will need to move that Tests folder one level up for example
- Code paths for test and non-test builds are entirely separated

#jira UE-135280
#rb Jerome.Delattre
#preflight 61e839d5276892ce10759205

[CL 18663474 by chris constantinescu in ue5-main branch]
2022-01-19 15:00:37 -05:00