summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-06-15 21:00:05 +0800
committerruki <[email protected]>2022-06-15 21:00:05 +0800
commit78e01e055477f407d6782075ae5cf6de0abf38f5 (patch)
tree4dd701d9d523ed443ba5efa279967fd8105ae26c
parent35f5b02e861858a98de4f00b71de9945cc54f567 (diff)
add is_arch64
-rw-r--r--xmake/core/package/package.lua5
-rw-r--r--xmake/core/project/target.lua5
2 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 7126a2619..0ddee289e 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -204,6 +204,11 @@ function _instance:is_arch(...)
end
end
+-- is 64bits architecture?
+function _instance:is_arch64()
+ return self:is_arch(".+64.*")
+end
+
-- the current platform is belong to the given target os?
function _instance:is_targetos(...)
local targetos = self:targetos()
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index b5b1d1e3c..21a27c91a 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -530,6 +530,11 @@ function _instance:is_arch(...)
end
end
+-- is 64bits architecture?
+function _instance:is_arch64()
+ return self:is_arch(".+64.*")
+end
+
-- get the platform instance
function _instance:platform()
local platform_inst = self._PLATFORM