Commit Graph

79 Commits

Author SHA1 Message Date
joe kirchoff
784e7f77d2 UnrealBuildTool: Platform validation is not required when calling QueryTargetMode and is causing an exception on windows if no msvc toolchain is available
#rnx
#jira UE-176380
#preflight 63e2c206902d6ba787b52852
#rb Josh.Adams

[CL 24062302 by joe kirchoff in ue5-main branch]
2023-02-07 18:16:52 -05:00
Joe Kirchoff
a46c2bb6c1 UnrealBuildTool: Reference any Target.cs files as rules dependencies so modifying them will update the Makefile, as these TargetRules can be referenced
#rnx
#rb Tim.Smith
#jira UE-168481
#preflight 63d7fa38d21dbe1d29525dd3

[CL 23910603 by Joe Kirchoff in ue5-main branch]
2023-01-30 12:31:04 -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
bryan sefcik
377f3c2775 * Updated AssemblyUtils to add an event callback to AssemblyResolve when calling AddFileToAssemblyCache. You had to before explicitly call InstallRecursiveAssemblyResolver to get the assembly cache resolver to work.
* Updated RulesAssembly to add the parent assembles to the assembly cache so the types in the other assemblies can be used when calling the constructor.
#preflight 63cf2823b84de45a0c12a6a4

[CL 23825371 by bryan sefcik in ue5-main branch]
2023-01-23 19:47:44 -05:00
bryan sefcik
0051530b8a Added the parent rule assemblies to the referencedassemblies list when compiling the rule assemblies dlls so the parent code can be used/referenced.
#preflight 63cef47d574ab9cae4868468

[CL 23821342 by bryan sefcik in ue5-main branch]
2023-01-23 16:10:30 -05:00
Jason Nadro
a673e16ce5 Added the ability to do Unreal Insights traces of the Shader Compiler Worker process.
This can be enabled by modifying `UnrealEngine\Engine\Saved\UnrealBuildTool\BuildConfiguration.xml` like so:

    <?xml version="1.0" encoding="utf-8" ?>
    <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
        <BuildConfiguration>
            <bShaderCompilerWorkerTrace>true</bShaderCompilerWorkerTrace>
        </BuildConfiguration>
    </Configuration>

- Added a build configuration xml value, `bShaderCompilerWorkerTrace`.
- Turning this on will set USE_SHADER_COMPILER_WORKER_TRACE=1
- Move the parameter -nothreading to be set when we launch the process instead of internally as an extra cmd line arg.
- Unreal Insights uses a separate thread to send events so threading support is needed for the program.  When we have USE_SHADER_COMPILER_WORKER_TRACE enabled we need to turn off `-nothreading`.
- When USE_SHADER_COMPILER_WORKER_TRACE is enabled we pass in `-trace=default` to get CPU event markers.
- The SCW program needs to turn on the following defines to be able to perform CPU and memory traces:
	ENABLE_LOW_LEVEL_MEM_TRACKER=1
	UE_MEMORY_TAGS_TRACE_ENABLED=1
	UE_TRACE_ENABLED=1
- Instrument Shader Compiler Worker with TRACE_CPUPROFILER_EVENT_SCOPE.  This are no-ops when this is turned off.

todo: Make the shader compiler worker inherit the trace args from the main process it was launched from.

#rb Yuriy.ODonnell
#jira none
#preflight 634ef80269246074db9637c2

[CL 22625183 by Jason Nadro in ue5-main branch]
2022-10-19 10:33:36 -04:00
bryan sefcik
b3f66b2e18 Added GetModuleDirectory which allows you to get the directory of the passed in module. This makes it easier to include directories from other modules.
#jira
[FYI] joe.kirchoff
#preflight 634de3f25f008d633fd22de1

[CL 22594094 by bryan sefcik in ue5-main branch]
2022-10-18 00:55:33 -04:00
marc audy
9dc0fb13b0 Make CreateTargetRulesInstance able to return null in the case a rules assembly does not exist
This fixes issues with platform extensions when using -TargetType
#rb Joe.Kirchoff, Josh.Adams

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 21408188 via CL 21408217
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v975-21357124)

[CL 21411933 by marc audy in ue5-main branch]
2022-08-16 15:31:02 -04:00
mike beach
456bfdb6a5 For UBT, mimicing changes made on the UE side in CL 20764079.
Adding support for managing multiple plugins, and specifying explicit versions to enable.

#rb joe.kirchoff
#preflight 62b3aedd7113a3a4a485adfc

#ROBOMERGE-OWNER: mike.beach
#ROBOMERGE-AUTHOR: mike.beach
#ROBOMERGE-SOURCE: CL 20801427 via CL 20801485 via CL 20801490
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20803672 by mike beach in ue5-main branch]
2022-06-23 18:08:26 -04:00
chris constantinescu
79078dc749 Low level tests adapter that can translate Catch2-defined test to a Functional Test
#preflight 629f74c6233ae0a8f8fb1f97
#rb Devin.Doucette

[CL 20540119 by chris constantinescu in ue5-main branch]
2022-06-07 12:37:53 -04:00
Ben Marsh
cf7582e557 UAT: Fix exception when creating dummy targets in UAT.
#preflight none

[CL 20374333 by Ben Marsh in ue5-main branch]
2022-05-25 20:48:43 -04: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
geordiemhall
5464547ddc PR #8761: Fix UE_5_1_OR_LATER not being defined by UnrealBuildTool (Contributed by geordiemhall)
#jira UE-138174
#preflight 61eef9364018b3d62e714798

[CL 18712466 by geordiemhall in ue5-main branch]
2022-01-24 14:20:05 -05:00
jonathan adamczewski
5b47c771a0 UnrealBuildTool: Remove various references to UE4.
#jira UE-111420
#trivial
#preflight none

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 18565554 in //UE5/Release-5.0/... via CL 18565574 via CL 18565586
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18565609 by jonathan adamczewski in ue5-main branch]
2022-01-10 16:46:54 -05:00
jonathan adamczewski
c7aeb00f62 UnrealBuildTool: Remove various references to UE4.
#jira UE-111420
#trivial
#preflight none

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 18565554 in //UE5/Release-5.0/... via CL 18565574
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18565586 by jonathan adamczewski in ue5-release-engine-test branch]
2022-01-10 16:46:00 -05:00
josh adams
039f12676b - Allow for UBT to look in the ini for DefaultEditorTarget (etc) when passed -TargetType=Editor and there are multiple editor target found
#jira UE-136312
#rb joe.kirchoff
#preflight 61d760e84c252480ca2f331b

#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 18537424 via CL 18538370 via CL 18538376 via CL 18538384 via CL 18538667 via CL 18538671 via CL 18538678
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18538694 by josh adams in ue5-main branch]
2022-01-06 20:49:05 -05:00
josh adams
12de45ab9f - Allow for UBT to look in the ini for DefaultEditorTarget (etc) when passed -TargetType=Editor and there are multiple editor target found
#jira UE-136312
#rb joe.kirchoff
#preflight 61d760e84c252480ca2f331b

#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 18537424 via CL 18538370 via CL 18538376 via CL 18538384 via CL 18538667 via CL 18538671
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18538678 by josh adams in ue5-release-engine-test branch]
2022-01-06 20:48:18 -05:00
JeanMichel Dignard
ac2243c139 UnrealBuildTool: Added TargetRules.bCompileAgainstEditor to enable our low level tests programs to compile against and test editor code.
- Drives the WITH_EDITOR preprocessor definition.
- Updated TargetRules.bBuildEditor to check the target type or bCompileAgainstEditor.
- Removed usages of TargetRules.bBuildEditor from UBT and replaced it with checks against the target type or the new bCompileAgainstEditor flag where necessary.

#rb Ben.Marsh
#preflight 61b21886764790bee6bce956

[CL 18419147 by JeanMichel Dignard in ue5-main branch]
2021-12-09 10:13:16 -05:00
jonathan adamczewski
f122b289e8 UnrealBuildTool: Makefile records external dependency on platform/group-specific target rule source file
#jira none

#ROBOMERGE-AUTHOR: jonathan.adamczewski
#ROBOMERGE-SOURCE: CL 18362831 in //UE5/Release-5.0/... via CL 18362844
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18362863 by jonathan adamczewski in ue5-release-engine-test branch]
2021-12-02 20:28:25 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
jonathan adamczewski
42ef103436 UnrealBuildTool:
Add new commandline option: -AlwaysRulesCompile, ensures that rules assemblies will be compiled during the run.

#jira none

#ROBOMERGE-SOURCE: CL 17428445 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17428452 by jonathan adamczewski in ue5-release-engine-test branch]
2021-09-03 19:27:06 -04:00
ben marsh
afd9828257 UBT: Fix typo.
#jira UE-122148

#ROBOMERGE-SOURCE: CL 17317782 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17317821 by ben marsh in ue5-release-engine-test branch]
2021-08-26 10:35:51 -04:00
jonathan adamczewski
7690b7838d UnrealBuildTool:
Per-project rules assembly csprojen.

Previously: all .build.cs and .target.cs were being grouped into a single project, which resulted in duplicate symbols when trying to build the project.

Now: multiple assemblies csprojs are generated, one for each Engine & Game project. Also, includes preprocessor defines.

#jira none
#rb ben.marsh

#ROBOMERGE-SOURCE: CL 16658600 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16658608 by jonathan adamczewski in ue5-release-engine-test branch]
2021-06-14 11:00:14 -04:00