Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](macOS) Fix build scripts for macOS #45751

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,14 @@ fi

eval set -- "${OPTS}"

PARALLEL="$(($(nproc) / 4 + 1))"
NUM_CORES=0
if [[ "$(uname -s)" == 'Darwin' ]]; then
NUM_CORES=$(sysctl -n hw.logicalcpu)
else
NUM_CORES=$(nproc)
fi

PARALLEL="$((${NUM_CORES} / 4 + 1))"
BUILD_FE=0
BUILD_BE=0
BUILD_CLOUD=0
Expand Down
4 changes: 3 additions & 1 deletion thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ SPEC_ARCHIVES=(
)
while [[ $# -gt 0 ]]; do
GIVEN_LIB=$1
GIVEN_LIB_LOWER="$(echo ${GIVEN_LIB} | awk '{print tolower($0)}')"
SPEC_LIB=
for TP_ARCH in "${TP_ARCHIVES[@]}"; do
if [[ "${GIVEN_LIB,,}" = "${TP_ARCH,,}" ]]; then
TP_ARCH_LOWER="$(echo ${TP_ARCH} | awk '{print tolower($0)}')"
if [[ "${GIVEN_LIB_LOWER}" = "${TP_ARCH_LOWER}" ]]; then
SPEC_LIB=${TP_ARCH}
break
fi
Expand Down
Loading