File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments