diff options
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 4fdf4a7a2..50c726a56 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -105,8 +105,9 @@ function nf_symbol(self, level) 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 + -- we need add `-g` to linker to generate pdb symbol file for mingw-gcc, llvm-clang on windows + local plat = self:plat() + if level == "debug" and (plat == "windows" or (plat == "mingw" and is_host("windows"))) then return "-g" end end |
