File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,11 @@ impl<'tcx> DebugContext<'tcx> {
61
61
62
62
let mut dwarf = DwarfUnit :: new ( encoding) ;
63
63
64
- // FIXME: how to get version when building out of tree?
65
- // Normally this would use option_env!("CFG_VERSION").
66
- let producer = format ! ( "cg_clif (rustc {})" , "unknown version" ) ;
64
+ let producer = format ! (
65
+ "cg_clif (rustc {}, cranelift {})" ,
66
+ rustc_interface:: util:: version_str( ) . unwrap_or( "unknown version" ) ,
67
+ cranelift_codegen:: VERSION ,
68
+ ) ;
67
69
let comp_dir = tcx. sess . working_dir . to_string_lossy ( false ) . into_owned ( ) ;
68
70
let ( name, file_info) = match tcx. sess . local_crate_source_file . clone ( ) {
69
71
Some ( path) => {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ extern crate rustc_fs_util;
14
14
extern crate rustc_hir;
15
15
extern crate rustc_incremental;
16
16
extern crate rustc_index;
17
+ extern crate rustc_interface;
17
18
extern crate rustc_session;
18
19
extern crate rustc_span;
19
20
extern crate rustc_target;
You can’t perform that action at this time.
0 commit comments