summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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