diff --git a/Source/Tools/Flax.Build/Build/Graph/LocalExecutor.cs b/Source/Tools/Flax.Build/Build/Graph/LocalExecutor.cs index c874dba51..9b4a571f1 100644 --- a/Source/Tools/Flax.Build/Build/Graph/LocalExecutor.cs +++ b/Source/Tools/Flax.Build/Build/Graph/LocalExecutor.cs @@ -27,12 +27,12 @@ namespace Flax.Build.BuildSystem.Graph /// /// The maximum amount of threads to be used for the parallel execution. /// - public int ThreadCountMax = 1410; + public int ThreadCountMax = Configuration.MaxConcurrency; /// /// The amount of threads to allocate per processor. Use it to allocate more threads for faster execution or use less to keep reduce CPU usage during build. /// - public float ProcessorCountScale = 1.0f; + public float ProcessorCountScale = Configuration.ConcurrencyProcessorScale; /// public override int Execute(List tasks) diff --git a/Source/Tools/Flax.Build/Configuration.cs b/Source/Tools/Flax.Build/Configuration.cs index 4fb58c4f2..baa4e30b1 100644 --- a/Source/Tools/Flax.Build/Configuration.cs +++ b/Source/Tools/Flax.Build/Configuration.cs @@ -133,6 +133,18 @@ namespace Flax.Build [CommandLine("logfile", "", "The log file path relative to the working directory. Set to empty to disable it/")] public static string LogFile = "Cache/Intermediate/Log.txt"; + /// + /// The maximum allowed concurrency for a build system (maximum active worker threads count). + /// + [CommandLine("maxConcurrency", "", "The maximum allowed concurrency for a build system (maximum active worker threads count).")] + public static int MaxConcurrency = 1410; + + /// + /// The concurrency scale for a build system that specifies how many worker threads allocate per-logical processor. + /// + [CommandLine("concurrencyProcessorScale", "", "The concurrency scale for a build system that specifies how many worker threads allocate per-logical processor.")] + public static float ConcurrencyProcessorScale = 1.0f; + /// /// The output binaries folder path relative to the working directory. ///