diff options
Diffstat (limited to 'xmake/core/tool/tool.lua')
| -rw-r--r-- | xmake/core/tool/tool.lua | 6 |
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 |
