diff options
| author | ruki <[email protected]> | 2020-04-03 23:33:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-03 15:21:05 +0800 |
| commit | 2e996cf451b107c5e9317d740b0ddff19cc83c24 (patch) | |
| tree | 492c3f2a1e8690608f82444b563358f1ab86bea7 | |
| parent | 980f30d65616b9ba527df9ce1b5c1643c3d75f22 (diff) | |
fix nf_symbol
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 6e96e03f3..c5af92e8e 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -90,7 +90,8 @@ end -- make the symbol flag function nf_symbol(self, level) -- only for source kind - if language.sourcekinds()[self:kind()] then + local kind = self:kind() + if language.sourcekinds()[kind] then local maps = _g.symbol_maps if not maps then maps = @@ -98,12 +99,12 @@ function nf_symbol(self, level) debug = "-g" , hidden = "-fvisibility=hidden" } - if self:has_flags("-fvisibility-inlines-hidden", "cxflags") then - maps.hidden = {maps.hidden, "-fvisibility-inlines-hidden"} + if kind == "cxx" and self:has_flags("-fvisibility-inlines-hidden", "cxflags") then + maps.hidden_cxx = {"-fvisibility=hidden", "-fvisibility-inlines-hidden"} end _g.symbol_maps = maps end - return maps[level] + return maps[level .. '_' .. kind] or maps[level] end end |
