diff options
| author | ruki <[email protected]> | 2022-06-30 00:37:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-06-30 00:37:40 +0800 |
| commit | 79f5772aefcc2be080f6b286b0cd666af16a00a4 (patch) | |
| tree | 29418ca09e4c05e22f557d3cd1d57b3f068e5a33 /xmake/modules/core/tools | |
| parent | ba237241d60f50c54316731a5361078eecda0f67 (diff) | |
add -g for mingw gcc
Diffstat (limited to 'xmake/modules/core/tools')
| -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 |
