Skip to content

Commit 23d680b

Browse files
committed
Allow parallel jobs to be passed to V8 build
e.g. JOBS=2 make
1 parent ce2d5ad commit 23d680b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
WAF=python tools/waf-light --jobs=1
1+
JOBS?=1 # The number of parallel processes. Use 'JOBS=2 make' for more.
2+
WAF=python tools/waf-light --jobs=$(JOBS)
23

34
all:
45
@$(WAF) build

wscript

+3-1
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,10 @@ def v8_cmd(bld, variant):
235235
else:
236236
mode = "debug"
237237

238-
cmd_R = 'python "%s" -C "%s" -Y "%s" visibility=default mode=%s %s library=static snapshot=on'
238+
cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static snapshot=on'
239239

240240
cmd = cmd_R % ( scons
241+
, Options.options.jobs
241242
, bld.srcnode.abspath(bld.env_of_name(variant))
242243
, v8dir_src
243244
, mode
@@ -276,6 +277,7 @@ def build_v8(bld):
276277
def build(bld):
277278
print "DEST_OS: " + bld.env['DEST_OS']
278279
print "DEST_CPU: " + bld.env['DEST_CPU']
280+
print "Parallel Jobs: " + str(Options.options.jobs)
279281

280282
if not bld.env["USE_SYSTEM"]:
281283
bld.add_subdirs('deps/libeio deps/libev deps/c-ares')

0 commit comments

Comments
 (0)