diff options
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 0c4627e64..4fdf4a7a2 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -90,7 +90,6 @@ end -- make the symbol flag function nf_symbol(self, level) - -- only for source kind local kind = self:kind() if language.sourcekinds()[kind] then local maps = _g.symbol_maps @@ -105,6 +104,11 @@ function nf_symbol(self, level) _g.symbol_maps = maps end return maps[level .. '_' .. kind] or maps[level] + elseif kind == "ld" or kind == "sh" then + -- we need add `-g` to linker to generate debug symbol file for mingw-gcc, llvm-clang + if self:plat() == "windows" and level == "debug" then + return "-g" + end end end |
