summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/ldc2.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-01-29 11:03:46 +0800
committerruki <[email protected]>2023-01-29 11:03:46 +0800
commit5a9df973279a63b94c220e6d21a7c3294bcff59f (patch)
tree108ef54b2bb9df818371de02939560fca6bb9ed6 /xmake/modules/core/tools/ldc2.lua
parent1e30c32a5c6a5355ba8784e91da13158a91c8487 (diff)
improve strip for dmd/ldc
Diffstat (limited to 'xmake/modules/core/tools/ldc2.lua')
-rw-r--r--xmake/modules/core/tools/ldc2.lua25
1 files changed, 17 insertions, 8 deletions
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]