diff options
| author | ruki <[email protected]> | 2020-04-03 23:27:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-03 14:42:29 +0800 |
| commit | 4550e5d123d72e88ed3b8771453e883907f5ee8e (patch) | |
| tree | 69c7e97fc98f856638fbb530b738428ed771422a | |
| parent | 295d42e9baeaece293cd8d76cf4af133a1298435 (diff) | |
improve nf_symbol for gcc
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index d64a7b5c8..8e74686cf 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -91,11 +91,18 @@ end function nf_symbol(self, level) -- only for source kind if language.sourcekinds()[self:kind()] then - local maps = - { - debug = "-g" - , hidden = "-fvisibility=hidden -fvisibility-inlines-hidden" - } + local maps = _g.symbol_maps + if not maps then + maps = + { + debug = "-g" + , hidden = "-fvisibility=hidden" + } + if self:has_flags("-fvisibility-inlines-hidden", "cxflags") then + maps.hidden = maps.hidden .. " -fvisibility-inlines-hidden" + end + _g.symbol_maps = maps + end return maps[level] end end |
