Include rustc and cranelift version in debuginfo
This commit is contained in:
parent
b7180ae39a
commit
84dd22969f
@ -61,9 +61,11 @@ impl<'tcx> DebugContext<'tcx> {
|
||||
|
||||
let mut dwarf = DwarfUnit::new(encoding);
|
||||
|
||||
// FIXME: how to get version when building out of tree?
|
||||
// Normally this would use option_env!("CFG_VERSION").
|
||||
let producer = format!("cg_clif (rustc {})", "unknown version");
|
||||
let producer = format!(
|
||||
"cg_clif (rustc {}, cranelift {})",
|
||||
rustc_interface::util::version_str().unwrap_or("unknown version"),
|
||||
cranelift_codegen::VERSION,
|
||||
);
|
||||
let comp_dir = tcx.sess.working_dir.to_string_lossy(false).into_owned();
|
||||
let (name, file_info) = match tcx.sess.local_crate_source_file.clone() {
|
||||
Some(path) => {
|
||||
|
@ -14,6 +14,7 @@ extern crate rustc_fs_util;
|
||||
extern crate rustc_hir;
|
||||
extern crate rustc_incremental;
|
||||
extern crate rustc_index;
|
||||
extern crate rustc_interface;
|
||||
extern crate rustc_session;
|
||||
extern crate rustc_span;
|
||||
extern crate rustc_target;
|
||||
|
Loading…
x
Reference in New Issue
Block a user