You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #13809 - valadaptive:artifact-dir, r=epage
Rename --out-dir to --artifact-dir
Progress towards unblocking #6790. Renames the experimental `--out-dir` argument to `--artifact-dir`, both to reflect that it's where the final build *artifacts* will be copied to, and to avoid confusion with the `OUT_DIR` environment variable which serves an entirely different purpose.
For transition purposes, `--out-dir` argument and `out-dir` config key will still work with a deprecation message encouraging the use of the new arg and config key.
### Rationale
A lot of people seem to be confused by the naming of the `--out-dir` argument, and are misled into thinking it serves the same purpose as the `OUT_DIR` environment variable:
> [However, it doesn't seem that OUT_DIR environment variable is set to the value of --out-dir when build.rs is executed.](#6790 (comment))
> [I understand that the worry is that there could be confusion between --out-dir for cargo and the environment variable OUT_DIR for build.rs, but doesn't it mean exactly the same in both cases?](#6790 (comment))
> [--out-dir: Things will be built into $PWD/target as normal, but copies some of the artifacts into the directory specified by out-dir (not a profile specific subdirectory). Unstable flag, added in March 2018. cargo build --out-dir #5203 Ability to specify output artifact name #4875. **Mimicks the behavior of OUT_DIR.**](#6100 (comment))
> [I recently had a couple of people express an interest in --out-dir being stabilized and from my initial digging it seems like what they may actually want is to switch to OUT_DIR, which is already stable.](#6100 (comment))
*`-Z` command-line flags are used to enable new functionality that may not
36
36
have an interface, or the interface has not yet been designed, or for more
@@ -74,7 +74,7 @@ For the latest nightly, see the [nightly version] of this page.
74
74
*[msrv-policy](#msrv-policy) --- MSRV-aware resolver and version selection
75
75
*[precise-pre-release](#precise-pre-release) --- Allows pre-release versions to be selected with `update --precise`
76
76
* Output behavior
77
-
*[out-dir](#out-dir) --- Adds a directory where artifacts are copied to.
77
+
*[artifact-dir](#artifact-dir) --- Adds a directory where artifacts are copied to.
78
78
*[Different binary name](#different-binary-name) --- Assign a name to the built binary that is separate from the crate name.
79
79
* Compile behavior
80
80
*[mtime-on-use](#mtime-on-use) --- Updates the last-modified timestamp on every dependency every time it is used, to provide a mechanism to delete unused artifacts.
@@ -206,27 +206,27 @@ minimum versions that you are actually using. That is, if Cargo.toml says
206
206
Indirect dependencies are resolved as normal so as not to be blocked on their
207
207
minimal version validation.
208
208
209
-
## out-dir
209
+
## artifact-dir
210
210
* Original Issue: [#4875](https://github.com/rust-lang/cargo/issues/4875)
0 commit comments