From: Peter Marheine Date: Mon, 8 Jan 2018 04:35:28 +0000 (+1100) Subject: Recover docs for incremental compilation X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~3^2~55^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e0b4c582a1f71f884a62716f26a9db1331d16405;p=cargo.git Recover docs for incremental compilation Cherry-picked from 45cc30bc7379ae13b079157b660de9d084de7a9e which failed to update the book and was replaced in 1271bb4de0c0e0a085be239c2418af9c673ffc87. --- diff --git a/src/doc/src/reference/config.md b/src/doc/src/reference/config.md index 047853eec..c590f5d4f 100644 --- a/src/doc/src/reference/config.md +++ b/src/doc/src/reference/config.md @@ -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. diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index 08d2adaa8..ebe3edf6b 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -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] diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 48372bb22..b8f746956 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -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