File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33
44. PHONY : build -verilator clean -verilator patch -verilator
55
6+ # Bound Verilator parallelism so hosted CI runners do not get swamped by an
7+ # unlimited "make -j" build. Allow callers to override when needed.
8+ VERILATOR_BUILD_JOBS ?= $(shell getconf _NPROCESSORS_ONLN 2 >/dev /null || sysctl -n hw . ncpu 2 >/dev /null || echo 4 )
9+
610# Patch target for verilator
711patch -verilator : 3 rd -party /verilator /. patch -applied
812
@@ -27,10 +31,11 @@ build-verilator: 3rd-party/verilator/.verilator-built
2731 else \
2832 echo "Building Verilator..." ; \
2933 echo "Installing Verilator by building it from source..." ; \
34+ echo "Using $(VERILATOR_BUILD_JOBS) parallel job(s) for Verilator build..." ; \
3035 cd 3 rd -party /verilator && \
3136 autoconf && \
3237 . /configure && \
33- make -j ; \
38+ $( MAKE ) -j $( VERILATOR_BUILD_JOBS ) ; \
3439 echo "Verilator build completed successfully." ; \
3540 touch $(CURDIR )/$@; \
3641 fi
You can’t perform that action at this time.
0 commit comments