UnrealBuildTool: Skip generating invalid platforms for client targets

#rnx

[CL 31662892 by joe kirchoff in ue5-main branch]
This commit is contained in:
joe kirchoff
2024-02-20 18:54:13 -05:00
parent 5819ae00b5
commit 8c3ca616ad
2 changed files with 17 additions and 0 deletions

View File

@@ -55,6 +55,8 @@ namespace UnrealBuildTool
Dictionary<FileReference, (UEBuildTarget BuildTarget, bool bBuildByDefault)> FileToTarget = new();
HashSet<UnrealTargetPlatform> ServerPlatforms = Utils.GetPlatformsInClass(UnrealPlatformClass.Server).ToHashSet();
foreach (UnrealTargetPlatform Platform in InPlatforms)
{
foreach (UnrealTargetConfiguration Configuration in InConfigurations)
@@ -82,6 +84,12 @@ namespace UnrealBuildTool
continue;
}
// Skip Server for all invalid platforms
if (ProjectTarget.TargetRules.Type == TargetType.Server && !ServerPlatforms.Contains(Platform))
{
continue;
}
bool bBuildByDefault = ShouldBuildByDefaultForSolutionTargets && ProjectTarget.SupportedPlatforms.Contains(Platform);
UnrealArchitectures ProjectArchitectures = UEBuildPlatform