diff options
| author | ruki <[email protected]> | 2023-01-29 22:17:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-29 22:18:08 +0800 |
| commit | d6f64cf2a51e2225afd292167e2baba6250233d0 (patch) | |
| tree | c88e57ade26172da5371402572e717ce43e285ac /xmake/modules/core/tools/dmd.lua | |
| parent | 0e533c28f85bf23b57a08709c9a845efad16ff45 (diff) | |
improve ldc
Diffstat (limited to 'xmake/modules/core/tools/dmd.lua')
| -rw-r--r-- | xmake/modules/core/tools/dmd.lua | 15 |
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 |
