From 671cabb77b5421fae4fabecdfe9d0df4adf0ddb8 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 1 Sep 2021 13:52:18 +0800 Subject: Update clang.lua --- xmake/modules/core/tools/clang.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit v1.3.1