Skip to content

Commit 853e34d

Browse files
committed
pass CFG_VER_DESCRIPTION to tool builds
Signed-off-by: onur-ozkan <[email protected]>
1 parent 92956e8 commit 853e34d

File tree

1 file changed

+9
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+9
-0
lines changed

src/bootstrap/src/core/build_steps/tool.rs

+9
Original file line numberDiff line numberDiff line change
@@ -234,23 +234,32 @@ pub fn prepare_tool_cargo(
234234
cargo.env("CFG_VERSION", builder.rust_version());
235235
cargo.env("CFG_RELEASE_NUM", &builder.version);
236236
cargo.env("DOC_RUST_LANG_ORG_CHANNEL", builder.doc_rust_lang_org_channel());
237+
237238
if let Some(ref ver_date) = builder.rust_info().commit_date() {
238239
cargo.env("CFG_VER_DATE", ver_date);
239240
}
241+
240242
if let Some(ref ver_hash) = builder.rust_info().sha() {
241243
cargo.env("CFG_VER_HASH", ver_hash);
242244
}
243245

246+
if let Some(description) = &builder.config.description {
247+
cargo.env("CFG_VER_DESCRIPTION", description);
248+
}
249+
244250
let info = GitInfo::new(builder.config.omit_git_hash, &dir);
245251
if let Some(sha) = info.sha() {
246252
cargo.env("CFG_COMMIT_HASH", sha);
247253
}
254+
248255
if let Some(sha_short) = info.sha_short() {
249256
cargo.env("CFG_SHORT_COMMIT_HASH", sha_short);
250257
}
258+
251259
if let Some(date) = info.commit_date() {
252260
cargo.env("CFG_COMMIT_DATE", date);
253261
}
262+
254263
if !features.is_empty() {
255264
cargo.arg("--features").arg(features.join(", "));
256265
}

0 commit comments

Comments
 (0)