Optimize Development builds to use SSE2 by default on Windows and use SSE4.1 when targeting Windows 11

This commit is contained in:
Wojtek Figat
2024-05-23 17:17:21 +02:00
parent b086de1c12
commit 82ee84ad39
3 changed files with 29 additions and 18 deletions

View File

@@ -511,16 +511,13 @@ namespace Flax.Build.Platforms
commonArgs.Add("/Os");
if (compileEnvironment.Optimization)
{
// Enable Most Speed Optimizations
// Commented out due to /Og causing slow build times without /GL in development builds
//commonArgs.Add("/Ox");
// Generate Intrinsic Functions
commonArgs.Add("/Oi");
// Frame-Pointer Omission
commonArgs.Add("/Oy");
// Only use /Ox with /GL to prevent too long build times
if (compileEnvironment.WholeProgramOptimization)
{
// Enable Most Speed Optimizations
@@ -889,7 +886,7 @@ namespace Flax.Build.Platforms
}
// Link Incrementally
if (linkEnvironment.UseIncrementalLinking)
if (linkEnvironment.UseIncrementalLinking && !linkEnvironment.LinkTimeCodeGeneration)
{
args.Add("/INCREMENTAL");
}