summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2025-08-30 09:32:32 +0800
committerGitHub <[email protected]>2025-08-30 09:32:32 +0800
commitaec56a9489a2df46d675589fb98b056a4dd2aca4 (patch)
tree57e393d03349ca5719c0b9b38e2103096586feff /xmake/modules
parentdc69d89bf6593d5fc5be80725997faa44b541471 (diff)
Check policies before accessing build cache settings
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/tools/xmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index f37ab1ab5..e2b22f926 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -280,7 +280,7 @@ function _get_configs(package, configs, opt)
if not package:use_external_includes() and (not policies or not policies:find("package.include_external_headers", 1, true)) then
table.insert(policies_list, "package.include_external_headers:n")
end
- if policies:find("package.build.ccache", 1, true) then
+ if policies and policies:find("package.build.ccache", 1, true) then
table.insert(configs, "--ccachedir=" .. path.join(path.directory(package:cachedir()), "build_cache"))
table.insert(policies_list, "build.ccache")
end