From eec39803f275a7334a0398077209062d2f6cc3de Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 30 Jun 2022 00:38:33 +0800 Subject: improve symbols flags --- xmake/modules/core/tools/gcc.lua | 5 +++-- 1 file 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 -- cgit v1.3.1