Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07

This commit is contained in:
bjorn3
2021-07-07 11:14:20 +02:00
55 changed files with 1285 additions and 448 deletions

View File

@@ -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,

View File

@@ -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) => {