From 4eb0e559f8b5eaaf1c79e00aa38b8c63e5833d49 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 29 Jan 2023 11:32:42 +0800 Subject: revert dmd --- xmake/modules/core/tools/dmd.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua index a68542be2..6dfa85695 100644 --- a/xmake/modules/core/tools/dmd.lua +++ b/xmake/modules/core/tools/dmd.lua @@ -57,6 +57,20 @@ function nf_optimize(self, 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", "-L-dead_strip"} + } + if self:is_plat("macosx", "iphoneos") then + maps.all = {"-L-x", "-L-dead_strip"} + end + return maps[level] + end +end + -- make the symbol flag function nf_symbol(self, level) local maps = { -- cgit v1.3.1