summaryrefslogtreecommitdiff
path: root/xmake/rules/utils
diff options
context:
space:
mode:
authorruki <[email protected]>2020-07-31 22:45:10 +0800
committerruki <[email protected]>2020-07-31 22:45:10 +0800
commitc63545cbe59c57f370abd7c93f8977836f4f0e14 (patch)
tree1b45b8f94c7e2aa027cf1246b04b59cdf8294333 /xmake/rules/utils
parentd120256e16d2f1ea1b610390dd0e34737f410b54 (diff)
strip codes for msvc
Diffstat (limited to 'xmake/rules/utils')
-rw-r--r--xmake/rules/utils/symbols/xmake.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/rules/utils/symbols/xmake.lua b/xmake/rules/utils/symbols/xmake.lua
index 5277cd783..4f158862d 100644
--- a/xmake/rules/utils/symbols/xmake.lua
+++ b/xmake/rules/utils/symbols/xmake.lua
@@ -21,10 +21,15 @@
-- 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")
local targetkind = target:targetkind()
- if target:get("symbols") == "debug" and (strip == "all" or strip == "debug") and (targetkind == "binary" or targetkind == "shared") then
+ if target:get("symbols") == "debug" and (strip == "all" or strip == "debug")
+ and (targetkind == "binary" or targetkind == "shared") and platform.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
end