summaryrefslogtreecommitdiff
path: root/xmake/core/tool/tool.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-05-18 00:51:11 +0800
committerruki <[email protected]>2024-05-18 00:51:11 +0800
commitfbc74a35c46a342048611e89f8a01e8d990f7bc6 (patch)
tree41a2dcc51d19402ce5e8fcb18b62224aa91637c6 /xmake/core/tool/tool.lua
parent95f874011c27d1145e14b7bb43b0dd578fa6c026 (diff)
improve vectorext
Diffstat (limited to 'xmake/core/tool/tool.lua')
-rw-r--r--xmake/core/tool/tool.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/tool/tool.lua b/xmake/core/tool/tool.lua
index 45ac78a08..8a453e1f0 100644
--- a/xmake/core/tool/tool.lua
+++ b/xmake/core/tool/tool.lua
@@ -33,6 +33,7 @@ local sandbox = require("sandbox/sandbox")
local toolchain = require("tool/toolchain")
local platform = require("platform/platform")
local language = require("language/language")
+local is_cross = require("base/private/is_cross")
local import = require("sandbox/modules/import")
-- new an instance
@@ -111,6 +112,11 @@ function _instance:is_arch(...)
end
end
+-- is cross-compilation?
+function _instance:is_cross()
+ return is_cross(self:plat(), self:arch())
+end
+
-- get the tool program
function _instance:program()
return self._PROGRAM