summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-10 23:12:10 +0800
committerruki <[email protected]>2021-02-10 23:12:10 +0800
commit21132a0efb088b4a5e9399282d6328ff6c5e0056 (patch)
tree2248333913bd8133d2a520d5879397025a2cae3c
parente61f10b4e11cadfb008f9d51e80d6cd6ffc87aff (diff)
add toolchain kind for package
-rw-r--r--xmake/actions/require/impl/package.lua7
-rw-r--r--xmake/core/package/package.lua8
2 files changed, 13 insertions, 2 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua
index 58386d140..fafa79b2d 100644
--- a/xmake/actions/require/impl/package.lua
+++ b/xmake/actions/require/impl/package.lua
@@ -565,6 +565,11 @@ function _load_package(packagename, requireinfo, opt)
end
_memcache():set2("cachedirs", package:cachedir(), true)
+ -- disable parallelize if this package is toolchain? we need install toolchain package first
+ if package:is_toolchain() then
+ package:set("parallelize", false)
+ end
+
-- add some builtin configurations to package
_add_package_configurations(package)
@@ -628,7 +633,7 @@ function _load_packages(requires, opt)
end
end
- -- save this package package
+ -- save this package
table.insert(packages, package)
end
end
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index b18119b6c..128839c0d 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -272,6 +272,7 @@ end
-- get the package kind
--
-- - binary
+-- - toolchain (is also binary)
-- - library(default)
--
function _instance:kind()
@@ -287,7 +288,12 @@ end
-- is binary package?
function _instance:is_binary()
- return self:kind() == "binary"
+ return self:kind() == "binary" or self:kind() == "toolchain"
+end
+
+-- is toolchain package?
+function _instance:is_toolchain()
+ return self:kind() == "toolchain"
end
-- is library package?