From fbc74a35c46a342048611e89f8a01e8d990f7bc6 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 18 May 2024 00:51:11 +0800 Subject: improve vectorext --- xmake/core/tool/tool.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmake/core/tool') 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 -- cgit v1.3.1