summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-11-23 20:50:36 +0800
committerruki <[email protected]>2024-11-23 20:50:36 +0800
commit313e5138663cc9a3beb83aa036b2ebb97186f944 (patch)
treef1928dbd24e60f416d74f0fd189f5d6d46249e31
parentf412067a27105d4f47922fde01fe27d441219143 (diff)
improve to extract syms #5859
-rw-r--r--xmake/rules/utils/symbols/extract/xmake.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/rules/utils/symbols/extract/xmake.lua b/xmake/rules/utils/symbols/extract/xmake.lua
index c59adc058..33f2323c9 100644
--- a/xmake/rules/utils/symbols/extract/xmake.lua
+++ b/xmake/rules/utils/symbols/extract/xmake.lua
@@ -21,13 +21,12 @@
-- define rule: utils.symbols.extract
rule("utils.symbols.extract")
before_link(function(target)
-
- -- imports
import("core.platform.platform")
-- need generate symbols?
local strip = target:get("strip")
- if target:get("symbols") == "debug" and (strip == "all" or strip == "debug")
+ local symbols = table.wrap(target:get("symbols"))
+ if table.contains(symbols, "debug") and (strip == "all" or strip == "debug")
and (target:is_binary() or target:is_shared()) and target:tool("strip") then -- only for strip command
target:data_set("utils.symbols.extract", true)
target:set("strip", "none") -- disable strip in link stage, because we need to run separate strip commands