File tree 1 file changed +26
-0
lines changed 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1130,3 +1130,29 @@ The 2021 edition will set the default [resolver version] to "2".
1130
1130
The ` -Z future-incompat-report ` flag enables the creation of a future-incompat report
1131
1131
for all dependencies. This makes users aware if any of their crate's dependencies
1132
1132
might stop compiling with a future version of Rust.
1133
+
1134
+ ### configurable-env
1135
+ * Original Pull Request: [ #9175 ] ( https://github.com/rust-lang/cargo/pull/9175 )
1136
+
1137
+ The ` -Z configurable-env ` flag enables the ` [env] ` section in the
1138
+ ` .cargo/config.toml ` file. This section allows you to set additional environment
1139
+ variables for build scripts, rustc invocations, ` cargo run ` and ` cargo build ` .
1140
+
1141
+ ``` toml
1142
+ [env ]
1143
+ OPENSSL_DIR = " /opt/openssl"
1144
+ ```
1145
+
1146
+ By default, the variables specified will not override values that already exist
1147
+ in the environment. This behavior can be changed by setting the ` force ` flag.
1148
+
1149
+ Setting the ` relative ` flag evaluates the value as a config-relative path that
1150
+ is relative to the parent directory of the ` .cargo ` directory that contains the
1151
+ ` config.toml ` file. The value of the environment variable will be the full
1152
+ absolute path.
1153
+
1154
+ ``` toml
1155
+ [env ]
1156
+ TMPDIR = { value = " /home/tmp" , force = true }
1157
+ OPENSSL_DIR = { value = " vendor/openssl" , relative = true }
1158
+ ```
You can’t perform that action at this time.
0 commit comments