From b92c18cf250a7cdc26c75d6867b128975a3871f2 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 16 Jun 2025 19:10:35 +0200 Subject: [PATCH] Fix missing/incorrect toolchain exception to log only once --- Source/Tools/Flax.Build/Build/Platform.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Build/Platform.cs b/Source/Tools/Flax.Build/Build/Platform.cs index 6304cdc4a..59572d669 100644 --- a/Source/Tools/Flax.Build/Build/Platform.cs +++ b/Source/Tools/Flax.Build/Build/Platform.cs @@ -17,6 +17,7 @@ namespace Flax.Build private static Platform _buildPlatform; private static Platform[] _platforms; private Dictionary _toolchains; + private uint _failedArchitectures = 0; /// /// 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); } }