summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-16 00:04:03 +0800
committerruki <[email protected]>2024-02-16 00:04:03 +0800
commite0663e1dad8b060a07e07e21574374929c26de03 (patch)
tree243a991429818225f68c00c1f5810725d526da5d /xmake/core/project/project.lua
parent0abc694eb2fd8efeb0150482e10c9d903c26de67 (diff)
fix is_cross
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 502ea5f3d..af92f8998 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -85,6 +85,11 @@ function project._api_is_arch(interp, ...)
return config.is_arch(...)
end
+-- the current platform and architecture is cross-complation?
+function project._api_is_cross(interp)
+ return config.is_cross()
+end
+
-- the current kind is belong to the given kinds?
function project._api_is_kind(interp, ...)
@@ -605,6 +610,7 @@ function project.apis()
, {"is_arch", project._api_is_arch }
, {"is_mode", project._api_is_mode }
, {"is_plat", project._api_is_plat }
+ , {"is_cross", project._api_is_cross }
, {"is_config", project._api_is_config }
-- get_xxx
, {"get_config", project._api_get_config }