summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-06-30 00:38:33 +0800
committerruki <[email protected]>2022-06-30 00:38:33 +0800
commiteec39803f275a7334a0398077209062d2f6cc3de (patch)
tree188034a717e47730f089abc335c4091b48c9e719
parent79f5772aefcc2be080f6b286b0cd666af16a00a4 (diff)
improve symbols flags
-rw-r--r--xmake/modules/core/tools/gcc.lua5
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