Build fails if nproc doesn't exist
Created by: ambaxter
Reproduction: [describe how you are able to reproduce ("trigger") this bug/issue.] Attempt to run the build on a machine without nproc installed
Expected behavior: [describe the behavior you would expect the repro to yield.] If nproc can't be found, fall back to gnproc, and if that fails, chose some sensible number (2?)
Actual behavior: [describe the actual behavior, which is presented through the repro.].
cp rust/src/target/x86_64-unknown-none/release/deps/*.rlib build/kernel
mkdir -p build/userspace
RUSTC="./rustc.sh" RUSTDOC="./rustdoc.sh" cargo rustc --manifest-path rust/src/libstd/Cargo.toml --features "panic-unwind" --target x86_64-unknown-redox --release -- -C codegen-units=`nproc` -L native=libc-artifacts/usr/lib -o build/userspace/libstd.rlib
/bin/sh: nproc: command not found
Build information: [output of rustc -V
, git rev-parse HEAD
, qemu-i386 -version
, uname -a
, etc.]
rustc -V
rustc 1.16.0-nightly (df8debf6d 2017-01-25)
git rev-parse HEAD
2bd69136dbaf7c6ef1556e7ed392392387ef6e9e
qemu-system-i386 -version ⏎
QEMU emulator version 2.8.0
uname -a
Darwin abaxter-OSX.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
Blocking/related: [issues or PRs blocking or being related to this issue.]
If the above does not fit the nature of the issue feel free to modify it.