From 2e04812cae7e38d9b097b40cce90b34ec6fb8fca Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 20 Feb 2023 22:47:16 +0800 Subject: improve target checkers --- xmake/plugins/check/checkers/api/target/ldflags.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xmake/plugins/check/checkers/api/target/ldflags.lua') diff --git a/xmake/plugins/check/checkers/api/target/ldflags.lua b/xmake/plugins/check/checkers/api/target/ldflags.lua index efe176aa5..e06d5bb09 100644 --- a/xmake/plugins/check/checkers/api/target/ldflags.lua +++ b/xmake/plugins/check/checkers/api/target/ldflags.lua @@ -22,8 +22,9 @@ import("core.tool.compiler") import(".api_checker") -function main() - api_checker.check_targets("ldflags", {check = function(target, value) +function main(opt) + opt = opt or {} + api_checker.check_targets("ldflags", table.join(opt, {check = function(target, value) if target:is_binary() then local linker = target:linker() if not linker:has_flags(value) then @@ -31,5 +32,5 @@ function main() end end return true - end}) + end})) end -- cgit v1.3.1