Merge remote-tracking branch 'origin/master' into sdl_platform

This commit is contained in:
2025-06-17 14:19:46 +03:00
6 changed files with 72 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ namespace Flax.Build
private static Platform _buildPlatform;
private static Platform[] _platforms;
private Dictionary<TargetArchitecture, Toolchain> _toolchains;
private uint _failedArchitectures = 0;
/// <summary>
/// Gets the current target platform that build tool runs on.
@@ -251,7 +252,8 @@ namespace Flax.Build
public Toolchain TryGetToolchain(TargetArchitecture targetArchitecture)
{
Toolchain result = null;
if (HasRequiredSDKsInstalled)
uint failedMask = 1u << (int)targetArchitecture; // Skip retrying if it already failed once on this arch
if (HasRequiredSDKsInstalled && (_failedArchitectures & failedMask) != failedMask)
{
try
{
@@ -259,6 +261,7 @@ namespace Flax.Build
}
catch (Exception ex)
{
_failedArchitectures |= failedMask;
Log.Exception(ex);
}
}