From 8f7ea1868ddff3e951e4b52652fc3abff8df84a9 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 19 Aug 2016 14:32:30 -0700 Subject: [PATCH] Add a note about parallel compilation in the README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index a5312b1..e8b0035 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,20 @@ and `HOST` variables. [cargo]: http://doc.crates.io/build-script.html#inputs-to-the-build-script +## Optional features + +Currently gcc-rs supports parallel compilation (think `make -jN`) but this +feature is turned off by default. To enable gcc-rs to compile C/C++ in parallel, +you can change your dependency to: + +```toml +[build-dependencies] +gcc = { version = "0.3", features = ["parallel"] } +``` + +By default gcc-rs will limit parallelism to `$NUM_JOBS`, or if not present it +will limit it to the number of cpus on the machine. + ## Compile-time Requirements To work properly this crate needs access to a C compiler when the build script