diff options
| author | ruki <[email protected]> | 2022-09-14 00:45:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-14 00:45:14 +0800 |
| commit | d9eefbd87fbec3dd99d975ce0462e4330a66bc61 (patch) | |
| tree | b0643605c3f6df9c9625665012309a5263d4243a /xmake/modules/core/tools/cl.lua | |
| parent | 25c5bda2b412663df909f09bcdf13e75a2102365 (diff) | |
improve optimize again
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 177b97669..b05e35eb4 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -158,19 +158,15 @@ end -- make the optimize flag function nf_optimize(self, level) - -- only for source kind - local kind = self:kind() - if language.sourcekinds()[kind] then - local maps = - { - none = "-Od" - , faster = "-Ox" - , fastest = "-O2 -fp:fast" - , smallest = "-O1 -GL" -- /GL and (/OPT:REF is on by default in linker), we need enable /ltcg - , aggressive = "-O2 -fp:fast" - } - return maps[level] - end + local maps = + { + none = "-Od" + , faster = "-Ox" + , fastest = "-O2 -fp:fast" + , smallest = "-O1 -GL" -- /GL and (/OPT:REF is on by default in linker), we need enable /ltcg + , aggressive = "-O2 -fp:fast" + } + return maps[level] end -- make vs runtime flag |
