Recover docs for incremental compilation
authorPeter Marheine <peter@taricorp.net>
Mon, 8 Jan 2018 04:35:28 +0000 (15:35 +1100)
committerPeter Marheine <peter@taricorp.net>
Mon, 8 Jan 2018 04:35:28 +0000 (15:35 +1100)
Cherry-picked from 45cc30bc7379ae13b079157b660de9d084de7a9e which failed
to update the book and was replaced in
1271bb4de0c0e0a085be239c2418af9c673ffc87.

src/doc/src/reference/config.md
src/doc/src/reference/environment-variables.md
src/doc/src/reference/manifest.md

index 047853eec066e0f6a73a9010cc3e4109a609fe4d..c590f5d4f4352c405bec69b90ec076e04bc3e6ce 100644 (file)
@@ -76,6 +76,8 @@ runner = ".."
 # custom flags to pass to all compiler invocations that target $triple
 # this value overrides build.rustflags when both are present
 rustflags = ["..", ".."]
+# Whether or not to enable incremental compilation
+incremental = true
 
 [target.'cfg(...)']
 # Similar for the $triple configuration, but using the `cfg` syntax.
index 08d2adaa8bb5de1bd64549094b4aa41e744bced3..ebe3edf6b4d8ad9bb834966585f47f8331b65ac9 100644 (file)
@@ -28,6 +28,10 @@ system:
 * `RUSTFLAGS` - A space-separated list of custom flags to pass to all compiler
   invocations that Cargo performs. In contrast with `cargo rustc`, this is
   useful for passing a flag to *all* compiler instances.
+* `CARGO_INCREMENTAL` - If this is set to 1 then Cargo will force incremental
+  compilation to be enabled for the current compilation, and when set to 0 it
+  will force disabling it. If this env var isn't present then cargo's defaults
+  will otherwise be used.
 
 Note that Cargo will also read environment variables for `.cargo/config`
 configuration values, as described in [that documentation][config-env]
index 48372bb223ce66581cb7b6cb64990e80533a6549..b8f746956705ba18e5719b78676c1f2efb956cab 100644 (file)
@@ -299,6 +299,7 @@ codegen-units = 1  # if > 1 enables parallel code generation which improves
                    # compile times, but prevents some optimizations.
                    # Passes `-C codegen-units`. Ignored when `lto = true`.
 panic = 'unwind'   # panic strategy (`-C panic=...`), can also be 'abort'
+incremental = true # whether or not incremental compilation is enabled
 
 # The release profile, used for `cargo build --release`.
 [profile.release]
@@ -309,6 +310,7 @@ lto = false
 debug-assertions = false
 codegen-units = 1
 panic = 'unwind'
+incremental = false
 
 # The testing profile, used for `cargo test`.
 [profile.test]
@@ -319,6 +321,7 @@ lto = false
 debug-assertions = true
 codegen-units = 1
 panic = 'unwind'
+incremental = true
 
 # The benchmarking profile, used for `cargo bench` and `cargo test --release`.
 [profile.bench]
@@ -329,6 +332,7 @@ lto = false
 debug-assertions = false
 codegen-units = 1
 panic = 'unwind'
+incremental = false
 
 # The documentation profile, used for `cargo doc`.
 [profile.doc]
@@ -339,6 +343,7 @@ lto = false
 debug-assertions = true
 codegen-units = 1
 panic = 'unwind'
+incremental = true
 ```
 
 ### The `[features]` section