summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpdagobert <[email protected]>2023-03-27 03:21:18 +0200
committerpdagobert <[email protected]>2023-03-27 07:12:04 +0200
commita894ed62de8110030f76de2d2c8ca2b885bb6d09 (patch)
treea7a61a3c907914ec3ba4f4e15d13e7df235cd16f
parent17c28518c434db16c563ade79b0ec9fc1976c757 (diff)
Fix dmd/ldc symbols generation
-rw-r--r--xmake/modules/core/tools/dmd.lua4
-rw-r--r--xmake/modules/core/tools/ldc2.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index 2570bc240..e02a1ed0a 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -72,7 +72,7 @@ function nf_strip(self, level)
end
-- make the symbol flag
-function nf_symbol(self, level)
+function nf_symbol(self, level, target)
local kind = self:kind()
if language.sourcekinds()[kind] then
local maps = _g.symbol_maps
@@ -83,7 +83,7 @@ function nf_symbol(self, level)
_g.symbol_maps = maps
end
return maps[level .. '_' .. kind] or maps[level]
- elseif kind == "dcld" then
+ elseif (kind == "dcld" or kind == "dcsh") and target:is_plat("windows") and level == "debug" then
return "-g"
end
end
diff --git a/xmake/modules/core/tools/ldc2.lua b/xmake/modules/core/tools/ldc2.lua
index b9c3d61e1..5a9f77026 100644
--- a/xmake/modules/core/tools/ldc2.lua
+++ b/xmake/modules/core/tools/ldc2.lua
@@ -49,7 +49,7 @@ function nf_optimize(self, level)
end
-- make the symbol flag
-function nf_symbol(self, level)
+function nf_symbol(self, level, target)
local kind = self:kind()
if language.sourcekinds()[kind] then
local maps = _g.symbol_maps
@@ -61,7 +61,7 @@ function nf_symbol(self, level)
_g.symbol_maps = maps
end
return maps[level .. '_' .. kind] or maps[level]
- elseif kind == "dcld" then
+ elseif (kind == "dcld" or kind == "dcsh") and target:is_plat("windows") and level == "debug" then
return "-g"
end
end