From 66b43560f7cf25b20ecb78a85dc17fe1f975bb48 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 24 Oct 2023 22:53:05 +0800 Subject: pass extras to tools --- xmake/modules/core/tools/link.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xmake/modules/core/tools/link.lua') diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua index ee68cf01f..9c53c2e28 100644 --- a/xmake/modules/core/tools/link.lua +++ b/xmake/modules/core/tools/link.lua @@ -58,9 +58,10 @@ function get(self, name) end -- make the strip flag -function nf_strip(self, level, target) +function nf_strip(self, level, opt) -- link.exe/arm64 does not support /opt:ref, /opt:icf + local target = opt.target if target and target:is_arch("arm64") then return end @@ -80,10 +81,11 @@ function nf_strip(self, level, target) end -- make the symbol flag -function nf_symbol(self, level, target) +function nf_symbol(self, level, opt) -- debug? generate *.pdb file local flags = nil + local target = opt.target if target then if target:type() == "target" then if level == "debug" and (target:is_binary() or target:is_shared()) then -- cgit v1.3.1