Improve 82ee84ad39 to support incremental linking

This commit is contained in:
Wojtek Figat
2024-05-24 14:15:52 +02:00
parent f326fa611f
commit 03b52f148c
2 changed files with 8 additions and 2 deletions

View File

@@ -281,10 +281,10 @@ namespace Flax.Build
options.CompileEnv.IntrinsicFunctions = true;
options.CompileEnv.BufferSecurityCheck = true;
options.CompileEnv.Inlining = true;
options.CompileEnv.WholeProgramOptimization = true;
options.CompileEnv.WholeProgramOptimization = false;
options.LinkEnv.DebugInformation = true;
options.LinkEnv.LinkTimeCodeGeneration = true;
options.LinkEnv.LinkTimeCodeGeneration = false;
options.LinkEnv.UseIncrementalLinking = true;
options.LinkEnv.Optimization = true;
break;

View File

@@ -526,6 +526,12 @@ namespace Flax.Build.Platforms
// Whole Program Optimization
commonArgs.Add("/GL");
}
else
{
// Enable SEE2 and other code optimizations but without breaking incremental linking
//commonArgs.Add("/Og"); // Results in D9035 warning
commonArgs.Add("/O2");
}
}
else
{