diff options
| author | ruki <[email protected]> | 2022-10-28 00:52:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-28 00:52:04 +0800 |
| commit | 1b3871b0affbdc071f2a78e70451221c47d70237 (patch) | |
| tree | 3b4d8076bac51aadb6afdeacf7911e86bb717502 /xmake/core/package/package.lua | |
| parent | cea2f829f0e71163c71ac8d9feb38d6b15c727b0 (diff) | |
improve package:is_cross
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 224a8fa37..3ce5395a2 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -586,9 +586,13 @@ end -- is cross-compilation? function _instance:is_cross() - if self:is_plat("windows", "mingw") and os.host() == "windows" then - -- always false on windows host - return false + if os.host() == "windows" then + if self:is_plat("windows") and + self:is_arch(os.arch()) then -- maybe cross-compilation for arm64 on x86/x64 + return false + elseif self:is_plat("mingw") then + return false + end end if not self:is_plat(os.host()) and not self:is_plat(os.subhost()) then return true |
