From e4b364db734a9a0e826d6cb9a9bff352c4f738dc Mon Sep 17 00:00:00 2001 From: a Date: Mon, 13 Oct 2025 14:54:13 +0200 Subject: [PATCH] for ffmpeg, x264 limit the parallel build process count to cpu count --- build/ffmpeg.sh | 2 +- build/x265.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/ffmpeg.sh b/build/ffmpeg.sh index da89c451aea..5d5c9dee0ae 100755 --- a/build/ffmpeg.sh +++ b/build/ffmpeg.sh @@ -30,4 +30,4 @@ CONF_FLAGS=( ) emconfigure ./configure "${CONF_FLAGS[@]}" $@ -emmake make -j +emmake make -j $(nproc) diff --git a/build/x265.sh b/build/x265.sh index d264b2ff66d..8c54b09b9a7 100755 --- a/build/x265.sh +++ b/build/x265.sh @@ -31,6 +31,8 @@ FLAGS_MAIN=( -DLINKED_12BIT=ON ) +PARALLEL_BUILD_JOBS=$(nproc) + cd source rm -rf build mkdir -p build @@ -39,17 +41,17 @@ mkdir -p main 10bit 12bit cd 12bit emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_12BIT[@]} -emmake make -j +emmake make -j ${PARALLEL_BUILD_JOBS} cd ../10bit emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_10BIT[@]} -emmake make -j +emmake make -j ${PARALLEL_BUILD_JOBS} cd ../main ln -sf ../10bit/libx265.a libx265_main10.a ln -sf ../12bit/libx265.a libx265_main12.a emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_MAIN[@]} -emmake make -j +emmake make -j ${PARALLEL_BUILD_JOBS} mv libx265.a libx265_main.a # Merge static libraries