From 5388efb7b2ce441eb32c2f3cbfc6027c3f452eda Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 26 Apr 2024 00:54:16 +0800 Subject: [PATCH] improve optimize for cl #5012 --- xmake/modules/core/tools/cl.lua | 4 ++-- xmake/modules/core/tools/clang_cl.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 8702dade629..bad9f5f6dfe 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -177,9 +177,9 @@ function nf_optimize(self, level) { none = "-Od" , faster = "-Ox" - , fastest = "-O2 -fp:fast" + , fastest = "-O2" , smallest = "-O1 -GL" -- /GL and (/OPT:REF is on by default in linker), we need to enable /ltcg - , aggressive = "-O2 -fp:fast" + , aggressive = "-O2" } return maps[level] end diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua index 27afb1d2617..694a05fcdb3 100644 --- a/xmake/modules/core/tools/clang_cl.lua +++ b/xmake/modules/core/tools/clang_cl.lua @@ -105,7 +105,7 @@ function nf_optimize(self, level) , faster = "-Ox" , fastest = "-O2" , smallest = "-O1" - , aggressive = "-O2 -fp:fast" + , aggressive = "-O2" } return maps[level] end