build(macOS): correctly set number of threads for building (#20)

The current value $(nproc) only works on Linux and defaults to empty string
on macos, which results in unlimited paralellism and likely a system OOM.
This commit is contained in:
Vlad Firoiu 2024-03-22 18:13:51 +00:00 committed by GitHub
commit cad3e88767
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

2
build-mac.sh Normal file → Executable file
View file

@ -24,5 +24,5 @@ fi
mkdir -p build
pushd build
cmake ${CMAKE_FLAGS} ..
cmake --build . --target dolphin-emu -- -j$(nproc)
cmake --build . --target dolphin-emu -- -j$(sysctl -n hw.ncpu)
popd