summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/dmd.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-01-29 22:17:44 +0800
committerruki <[email protected]>2023-01-29 22:18:08 +0800
commitd6f64cf2a51e2225afd292167e2baba6250233d0 (patch)
treec88e57ade26172da5371402572e717ce43e285ac /xmake/modules/core/tools/dmd.lua
parent0e533c28f85bf23b57a08709c9a845efad16ff45 (diff)
improve ldc
Diffstat (limited to 'xmake/modules/core/tools/dmd.lua')
-rw-r--r--xmake/modules/core/tools/dmd.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index cb364c92c..9e3001aeb 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -73,10 +73,17 @@ end
-- make the symbol flag
function nf_symbol(self, level)
- local maps = {
- debug = "-g -debug"
- }
- return maps[level]
+ local kind = self:kind()
+ if language.sourcekinds()[kind] then
+ local maps = _g.symbol_maps
+ if not maps then
+ maps = {
+ debug = {"-g", "-debug"}
+ }
+ _g.symbol_maps = maps
+ end
+ return maps[level .. '_' .. kind] or maps[level]
+ end
end
-- make the warning flag