[vlc-commits] apple: build: ensure core_count is valid
Alexandre Janniaux
git at videolan.org
Wed Jul 22 15:28:12 CEST 2020
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Jun 10 17:37:14 2020 +0200| [777bcf4ae79edbbc931abc3666c31be0e2882d92] | committer: Alexandre Janniaux
apple: build: ensure core_count is valid
When compiling on linux with set -x, the script fails because
machdep.cpu.core_count doesn't exist. Use 0 core in that case and rely
on the value set by -j/--jobs.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=777bcf4ae79edbbc931abc3666c31be0e2882d92
---
extras/package/apple/build.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extras/package/apple/build.sh b/extras/package/apple/build.sh
index 1b112e8465..209ec28070 100755
--- a/extras/package/apple/build.sh
+++ b/extras/package/apple/build.sh
@@ -89,8 +89,8 @@ VLC_USE_PREBUILT_CONTRIBS=0
# User-provided URL from where to fetch contribs, empty
# for the default chosen by contrib system
VLC_PREBUILT_CONTRIBS_URL=${VLC_PREBUILT_CONTRIBS_URL:-""}
-# The number of cores to compile on
-CORE_COUNT=$(sysctl -n machdep.cpu.core_count)
+# The number of cores to compile on, or 0 + 1 if not darwin
+CORE_COUNT=$(sysctl -n machdep.cpu.core_count || echo 0)
let VLC_USE_NUMBER_OF_CORES=$CORE_COUNT+1
# whether to disable debug mode (the default) or not
VLC_DISABLE_DEBUG=0
More information about the vlc-commits
mailing list