summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-12 23:02:20 +0800
committerruki <[email protected]>2021-01-12 23:02:20 +0800
commitdb1c57d774b3807640b1e09414af7c6488a5fe86 (patch)
treee20ecb2506cb66c788703399472e5382010fab56
parent1d7ff7a14fd27aa6164d43a62a66a516f574978b (diff)
improve tools/make
-rw-r--r--xmake/modules/package/tools/make.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua
index 0075ab723..57e9b631e 100644
--- a/xmake/modules/package/tools/make.lua
+++ b/xmake/modules/package/tools/make.lua
@@ -85,7 +85,7 @@ function build(package, configs, opt)
opt = opt or {}
-- pass configurations
- local njob = tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
+ local njob = opt.jobs or option.get("jobs") or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
local argv = {"-j" .. njob}
if option.get("verbose") then
table.insert(argv, "VERBOSE=1")
@@ -116,7 +116,8 @@ function install(package, configs, opt)
opt = opt or {}
-- pass configurations
- local argv = {"install"}
+ local njob = opt.jobs or option.get("jobs") or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
+ local argv = {"install", "-j" .. njob}
if option.get("verbose") then
table.insert(argv, "VERBOSE=1")
end