diff options
| -rw-r--r-- | xmake/modules/core/tools/clang.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/clang.lua b/xmake/modules/core/tools/clang.lua index a0d39f3b4..e5734a953 100644 --- a/xmake/modules/core/tools/clang.lua +++ b/xmake/modules/core/tools/clang.lua @@ -124,3 +124,16 @@ function nf_warning(self, level) } return maps[level] end + +-- make the symbol flag +function nf_symbol(self, level) + local kind = self:kind() + if kind == "ld" or kind == "sh" then + -- clang/windows need add `-g` to linker to generate pdb symbol file + if self:plat() == "windows" and level == "debug" then + return "-g" + end + else + return _super.nf_symbol(self, level) + end +end |
