diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-07-07 11:14:20 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-07-07 11:14:20 +0200 |
| commit | fb92375755a00a39a900da50f581917519b5af6b (patch) | |
| tree | 479b4faf1a6fd9d4ddce341c8dd7eac792797b6a /src/debuginfo | |
| parent | 4cfa1fcb5b566e9bbe24fafb77027a39685dfe6b (diff) | |
| download | rust-fb92375755a00a39a900da50f581917519b5af6b.tar.gz rust-fb92375755a00a39a900da50f581917519b5af6b.zip | |
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
Diffstat (limited to 'src/debuginfo')
| -rw-r--r-- | src/debuginfo/line_info.rs | 2 | ||||
| -rw-r--r-- | src/debuginfo/mod.rs | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/debuginfo/line_info.rs b/src/debuginfo/line_info.rs index 9eb06770630..c7e15f81e03 100644 --- a/src/debuginfo/line_info.rs +++ b/src/debuginfo/line_info.rs @@ -10,7 +10,7 @@ use rustc_span::{ }; use cranelift_codegen::binemit::CodeOffset; -use cranelift_codegen::machinst::MachSrcLoc; +use cranelift_codegen::MachSrcLoc; use gimli::write::{ Address, AttributeValue, FileId, FileInfo, LineProgram, LineString, LineStringTable, diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs index 61e54a76f29..c67336eb3f2 100644 --- a/src/debuginfo/mod.rs +++ b/src/debuginfo/mod.rs @@ -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) => { |
