Skip to content

Commit 0468cd6

Browse files
committed
doc: it's valid to use OUT_DIR for intermediate artifacts
Eg, storing `.o` files in OUT_DIR is ok! See rust-lang#9661 (comment) for some discussion.
1 parent 9978fd7 commit 0468cd6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/doc/src/reference/build-scripts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ the source directory of the build script’s package.
6969

7070
### Outputs of the Build Script
7171

72-
Build scripts may save any output files in the directory specified in the
73-
[`OUT_DIR` environment variable][build-env]. Scripts should not modify any
74-
files outside of that directory.
72+
Build scripts may save any output files or intermediate artifacts in the
73+
directory specified in the [`OUT_DIR` environment variable][build-env]. Scripts
74+
should not modify any files outside of that directory.
7575

7676
Build scripts communicate with Cargo by printing to stdout. Cargo will
7777
interpret each line that starts with `cargo:` as an instruction that will

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ let out_dir = env::var("OUT_DIR").unwrap();
318318
* `CARGO_CFG_TARGET_POINTER_WIDTH=64` — The CPU [pointer width].
319319
* `CARGO_CFG_TARGET_ENDIAN=little` — The CPU [target endianness].
320320
* `CARGO_CFG_TARGET_FEATURE=mmx,sse` — List of CPU [target features] enabled.
321-
* `OUT_DIR` — the folder in which all output should be placed. This folder is
322-
inside the build directory for the package being built, and it is
323-
unique for the package in question.
321+
* `OUT_DIR` — the folder in which all output and intermediate artifacts should
322+
be placed. This folder is inside the build directory for the
323+
package being built, and it is unique for the package in question.
324324
* `TARGET` — the target triple that is being compiled for. Native code should be
325325
compiled for this triple. See the [Target Triple] description
326326
for more information.

0 commit comments

Comments
 (0)