diff options
| -rw-r--r-- | xmake/modules/core/tools/dmd.lua | 19 | ||||
| -rw-r--r-- | xmake/modules/core/tools/ldc2.lua | 25 |
2 files changed, 21 insertions, 23 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua index 899fc2511..a68542be2 100644 --- a/xmake/modules/core/tools/dmd.lua +++ b/xmake/modules/core/tools/dmd.lua @@ -48,21 +48,10 @@ function nf_optimize(self, level) local maps = { fast = "-O" - , faster = "-O -release" - , fastest = "-O -release -inline -boundscheck=off" - , smallest = "-O -release -boundscheck=off" - , aggressive = "-O -release -inline -boundscheck=off" - } - return maps[level] - end -end - --- make the strip flag -function nf_strip(self, level) - if not self:is_plat("windows") then - local maps = { - debug = "-L-S", - all = "-L-s" + , faster = {"-O", "-release"} + , fastest = {"-O", "-release", "-inline", "-boundscheck=off"} + , smallest = {"-O", "-release", "-boundscheck=off"} + , aggressive = {"-O", "-release", "-inline", "-boundscheck=off"} } return maps[level] end diff --git a/xmake/modules/core/tools/ldc2.lua b/xmake/modules/core/tools/ldc2.lua index d62c45a53..2562ef07e 100644 --- a/xmake/modules/core/tools/ldc2.lua +++ b/xmake/modules/core/tools/ldc2.lua @@ -36,21 +36,30 @@ end -- make the optimize flag function nf_optimize(self, level) - local maps = - { + local maps = { fast = "-O" - , faster = "-O --release" - , fastest = "-O --release --boundscheck=off" - , smallest = "-O --release --boundscheck=off" - , aggressive = "-O --release --boundscheck=off" + , faster = {"-O", "--release"} + , fastest = {"-O", "--release", "--boundscheck=off"} + , smallest = {"-O", "--release", "--boundscheck=off"} + , aggressive = {"-O", "--release", "--boundscheck=off"} } return maps[level] end +-- make the strip flag +function nf_strip(self, level) + if not self:is_plat("windows") then + local maps = { + debug = "-L-S", + all = "-L-s" + } + return maps[level] + end +end + -- make the symbol flag function nf_symbol(self, level) - local maps = - { + local maps = { debug = "-g --d-debug" } return maps[level] |
