Limit MSVC compiler code generation threads to one per file

This commit is contained in:
2024-05-19 23:06:02 +03:00
parent 7f1bcd91f5
commit 593c82543f

View File

@@ -449,6 +449,9 @@ namespace Flax.Build.Platforms
// Compile Without Linking
commonArgs.Add("/c");
// Use one thread per process
commonArgs.Add("/cgthreads1");
// C++ version
switch (compileEnvironment.CppVersion)
{
@@ -776,6 +779,9 @@ namespace Flax.Build.Platforms
// Report internal compiler errors
args.Add("/ERRORREPORT:PROMPT");
// Use maximum supported number of threads for linking
args.Add("/cgthreads:8");
// Output File Name
args.Add(string.Format("/OUT:\"{0}\"", outputFilePath));