about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-26 22:12:35 +0000
committerbors <bors@rust-lang.org>2024-01-26 22:12:35 +0000
commitc073f56a416b541fc66e46fb5265dad870da9229 (patch)
treec55971383f7dc516ca9b27a80dc9d949cd583c48 /compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
parente7bbe8ce933123a8e327c79e38bcb790595e6a65 (diff)
parent37018026f0a4b119778e07d6a44b149de8dcfd0c (diff)
Auto merge of #120395 - bjorn3:sync_cg_clif-2024-01-26, r=bjorn3
Subtree sync for rustc_codegen_cranelift

A couple of fixes as well as an update to Cranelift 0.104, which includes a fix for the ABI of `Option<u128>`.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
index e6edc452cfb..2d9c2ecdbc2 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
@@ -13,17 +13,14 @@ use gimli::write::{
 };
 use gimli::{Encoding, Format, LineEncoding, RunTimeEndian};
 use indexmap::IndexSet;
+use rustc_session::Session;
 
 pub(crate) use self::emit::{DebugReloc, DebugRelocName};
 pub(crate) use self::unwind::UnwindContext;
 use crate::prelude::*;
 
-pub(crate) fn producer() -> String {
-    format!(
-        "rustc version {} with cranelift {}",
-        rustc_interface::util::rustc_version_str().unwrap_or("unknown version"),
-        cranelift_codegen::VERSION,
-    )
+pub(crate) fn producer(sess: &Session) -> String {
+    format!("rustc version {} with cranelift {}", sess.cfg_version, cranelift_codegen::VERSION)
 }
 
 pub(crate) struct DebugContext {
@@ -67,7 +64,7 @@ impl DebugContext {
 
         let should_remap_filepaths = tcx.sess.should_prefer_remapped_for_codegen();
 
-        let producer = producer();
+        let producer = producer(tcx.sess);
         let comp_dir = tcx
             .sess
             .opts