Skip to content

Commit e4b364d

Browse files
author
a
committed
for ffmpeg, x264 limit the parallel build process count to cpu count
1 parent f876f90 commit e4b364d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

build/ffmpeg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ CONF_FLAGS=(
3030
)
3131

3232
emconfigure ./configure "${CONF_FLAGS[@]}" $@
33-
emmake make -j
33+
emmake make -j $(nproc)

build/x265.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ FLAGS_MAIN=(
3131
-DLINKED_12BIT=ON
3232
)
3333

34+
PARALLEL_BUILD_JOBS=$(nproc)
35+
3436
cd source
3537
rm -rf build
3638
mkdir -p build
@@ -39,17 +41,17 @@ mkdir -p main 10bit 12bit
3941

4042
cd 12bit
4143
emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_12BIT[@]}
42-
emmake make -j
44+
emmake make -j ${PARALLEL_BUILD_JOBS}
4345

4446
cd ../10bit
4547
emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_10BIT[@]}
46-
emmake make -j
48+
emmake make -j ${PARALLEL_BUILD_JOBS}
4749

4850
cd ../main
4951
ln -sf ../10bit/libx265.a libx265_main10.a
5052
ln -sf ../12bit/libx265.a libx265_main12.a
5153
emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_MAIN[@]}
52-
emmake make -j
54+
emmake make -j ${PARALLEL_BUILD_JOBS}
5355
mv libx265.a libx265_main.a
5456

5557
# Merge static libraries

0 commit comments

Comments
 (0)