Skip to content

Commit

Permalink
fix: use sysctl for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
polvalente committed Jul 16, 2024
1 parent 377ed77 commit 49b702a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/build_and_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ set -e

IREE_BUILD_TARGET=$1

NUM_JOBS=-j$(($(nproc) - 2 ))
get_nproc() {
if [ "$(uname -s)" = "Darwin" ]; then
sysctl -n hw.ncpu
else
nproc
fi
}

NUM_JOBS=-j$(get_nproc)

mkdir -p iree-runtime/artifacts

Expand Down

0 comments on commit 49b702a

Please sign in to comment.