summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-11 00:53:07 +0800
committerruki <[email protected]>2024-04-11 00:53:07 +0800
commitdec2cf143065520452917393ecf28d7479f026c4 (patch)
treec4684bcaca8e454558c2d4d9e9459286edb12e06 /xmake/core/package/package.lua
parent6bf4a28541f4a785db59fdd7bc62c3b2ede4017f (diff)
improve to fetch package for cross-compilation #4935
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 292f774c5..5d80c5e38 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1729,8 +1729,9 @@ end
function _instance:_fetch_library(opt)
opt = opt or {}
local fetchinfo
+ local is_cross = self:is_cross()
local on_fetch = self:script("fetch")
- if on_fetch then
+ if on_fetch and not is_cross() then
fetchinfo = on_fetch(self, {force = opt.force,
system = opt.system,
external = opt.external,
@@ -1947,7 +1948,7 @@ function _instance:fetch(opt)
end
end
- -- fetch it from the system and external package sources (disabled for cross-compilation)
+ -- fetch it from the system and external package sources
if not fetchinfo and system ~= false then
fetchinfo = self:_fetch_library({system = true, require_version = require_ver, external = external, force = opt.force})
if fetchinfo then