about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-07-07 11:14:20 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-07-07 11:14:20 +0200
commitd531f3d6eef9eef1a699b3ffb6dce4e911690dca (patch)
tree039f047e80faf6c85c626388dc3a0933b3075f6f /compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
parentc5e344f7747dbd7e7d4b209e3c480deb5979a56f (diff)
parent3a31c6d8272c14388a34622193baf553636fe470 (diff)
downloadrust-d531f3d6eef9eef1a699b3ffb6dce4e911690dca.tar.gz
rust-d531f3d6eef9eef1a699b3ffb6dce4e911690dca.zip
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
index 61e54a76f29..c67336eb3f2 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_cranelift/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) => {