summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/link.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-21 23:38:00 +0800
committerruki <[email protected]>2021-05-21 23:38:00 +0800
commit81b6bcf17837db9771ba3781dd63e90ce6af2d65 (patch)
tree7013a6e2b90a27cf6d321af027025c1b7da30e1e /xmake/modules/core/tools/link.lua
parentab71fcb7bfaf85340c92425a9e167e172b25fa76 (diff)
set binary as default target kind
Diffstat (limited to 'xmake/modules/core/tools/link.lua')
-rw-r--r--xmake/modules/core/tools/link.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua
index 9ee2dd7f2..e7e1596f5 100644
--- a/xmake/modules/core/tools/link.lua
+++ b/xmake/modules/core/tools/link.lua
@@ -77,12 +77,15 @@ function nf_symbol(self, level, target)
-- debug? generate *.pdb file
local flags = nil
- local targetkind = target:get("kind")
- if level == "debug" and (targetkind == "binary" or targetkind == "shared") then
- if target and target.symbolfile then
- flags = {"-debug", "-pdb:" .. target:symbolfile()}
- else
- flags = "-debug"
+ if target then
+ if target:type() == "target" then
+ if level == "debug" and (target:is_binary() or target:is_shared()) then
+ flags = {"-debug", "-pdb:" .. target:symbolfile()}
+ end
+ else -- for option
+ if level == "debug" then
+ flags = "-debug"
+ end
end
end
return flags