summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-01-26 13:15:34 +0800
committerruki <[email protected]>2025-01-26 13:15:34 +0800
commit41e59a16600b455f2f6f03b541459ac22d34bcb0 (patch)
tree8dc3e2058726f3ae660e03c61cfe7d0b305cf0b0
parent68adea7a1881be0a202dd51baf310db4c332be55 (diff)
improve nf_symbol
-rw-r--r--xmake/modules/core/tools/iccarm.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/iccarm.lua b/xmake/modules/core/tools/iccarm.lua
index b7debea92..2643c8721 100644
--- a/xmake/modules/core/tools/iccarm.lua
+++ b/xmake/modules/core/tools/iccarm.lua
@@ -19,3 +19,24 @@
--
inherit("gcc")
+
+-- make the symbol flag
+function nf_symbol(self, level)
+ local kind = self:kind()
+ if language.sourcekinds()[kind] then
+ local maps = _g.symbol_maps
+ if not maps then
+ maps = {
+ debug = "-g"
+ }
+ _g.symbol_maps = maps
+ end
+ return maps[level .. '_' .. kind] or maps[level]
+ elseif kind == "ld" or kind == "sh" then
+ local plat = self:plat()
+ if level == "debug" and is_host("windows") then
+ return "-g"
+ end
+ end
+end
+