summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-25 22:50:13 +0800
committerruki <[email protected]>2024-04-25 22:50:13 +0800
commit979023e54bc5d11db19c0df7e181c3824f18dc41 (patch)
tree97c69447440a93c777317c6eb5730c06cd2a1117
parenteae5d0fea8a8e36f6183e808c8fa7e851a4b7212 (diff)
improve check flags #5000
-rw-r--r--xmake/modules/private/check/checkers/api/api_checker.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/modules/private/check/checkers/api/api_checker.lua b/xmake/modules/private/check/checkers/api/api_checker.lua
index 375e27354..7da86af0d 100644
--- a/xmake/modules/private/check/checkers/api/api_checker.lua
+++ b/xmake/modules/private/check/checkers/api/api_checker.lua
@@ -145,10 +145,12 @@ function check_flag(target, toolinst, flagkind, flag)
local extraconf = target:extraconf(flagkind)
flag = target_utils.flag_belong_to_tool(target, flag, toolinst, extraconf)
if flag then
- return toolinst:has_flags(flag)
- else
- return true
+ extraconf = extraconf and extraconf[flag]
+ if not extraconf or not extraconf.force then
+ return toolinst:has_flags(flag)
+ end
end
+ return true
end
-- check api configuration in targets