Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
bc1a566
Prepare for merging from rust-lang/rust
Feb 17, 2026
d58d3e2
Merge ref '3c9faa0d037b' from rust-lang/rust
Feb 17, 2026
b3b48e5
Merge pull request #4861 from rust-lang/rustup-2026-02-17
oli-obk Feb 17, 2026
7f17343
Prepare for merging from rust-lang/rust
Feb 18, 2026
61065bb
Merge ref '8387095803f2' from rust-lang/rust
Feb 18, 2026
c1e4c33
Merge pull request #4864 from rust-lang/rustup-2026-02-18
RalfJung Feb 18, 2026
c57ecb0
Prepare for merging from rust-lang/rust
Feb 19, 2026
9437c83
Merge ref 'e0cb264b8145' from rust-lang/rust
Feb 19, 2026
8b03e83
fix genmc build
RalfJung Feb 19, 2026
d4b4ba8
Merge pull request #4865 from rust-lang/rustup-2026-02-19
RalfJung Feb 19, 2026
054d4af
Print a warning when trying to open a file in `/proc`
y1lan Feb 13, 2026
220d514
clean up path check
RalfJung Feb 21, 2026
1650751
Merge pull request #4857 from y1lan/warning_of_openning_proc_files
RalfJung Feb 21, 2026
e3062fa
Avoid keeping ThreadData borrowed while formatting tracing arguments
Stypox Feb 16, 2026
041e3a5
Remove RDTSC timer and always rely on Instant instead
Stypox Feb 16, 2026
b0b2e8c
Update documentation for tracing
Stypox Feb 16, 2026
e077016
Merge pull request #4860 from Stypox/fix-nested-tracing
RalfJung Feb 21, 2026
7be6269
Fix typo in tracing.md for `tracing_separate_thread`
willschlitzer Feb 22, 2026
4a2f129
Prepare for merging from rust-lang/rust
Feb 22, 2026
40289de
Merge ref '5fb2ff8611e5' from rust-lang/rust
Feb 22, 2026
20de36c
Merge pull request #4866 from willschlitzer/patch-1
RalfJung Feb 22, 2026
3607191
register Miri-specific symbols with the interner
RalfJung Feb 22, 2026
361416e
Merge pull request #4867 from rust-lang/rustup-2026-02-22
RalfJung Feb 22, 2026
e7e512d
Prepare for merging from rust-lang/rust
Feb 23, 2026
93e3234
Merge ref 'c78a29473a68' from rust-lang/rust
Feb 23, 2026
ca026f5
Merge pull request #4869 from rust-lang/rustup-2026-02-23
RalfJung Feb 23, 2026
7ed7b2b
Prepare for merging from rust-lang/rust
RalfJung Feb 24, 2026
4c14efb
Merge ref 'b3869b94cd1e' from rust-lang/rust
RalfJung Feb 24, 2026
4ab624f
Merge pull request #4870 from RalfJung/rustup
RalfJung Feb 24, 2026
2e17c9b
remove FIXME about size of Pointer type
RalfJung Feb 24, 2026
b6c1924
Merge pull request #4872 from RalfJung/ptr-size-comment
RalfJung Feb 25, 2026
d398074
Start socket shim
WhySoBad Feb 22, 2026
e4d35f5
Merge pull request #4868 from WhySoBad/network-socket-start
RalfJung Feb 26, 2026
6d271ba
Prepare for merging from rust-lang/rust
RalfJung Feb 26, 2026
8ebf937
Merge ref 'bb779a91568a' from rust-lang/rust
RalfJung Feb 26, 2026
470706d
silence clippy lint that makes code harder to read
RalfJung Feb 26, 2026
b8d5538
add test for deallocating partially-interior-mutable ref
RalfJung Feb 26, 2026
7ca67a4
Merge pull request #4874 from RalfJung/rustup
RalfJung Feb 26, 2026
3c492b4
Merge pull request #4875 from RalfJung/cell-dealloc-test
RalfJung Feb 26, 2026
7b8534e
Prepare for merging from rust-lang/rust
RalfJung Feb 28, 2026
c64335d
Merge ref 'ba1567989ee7' from rust-lang/rust
RalfJung Feb 28, 2026
1e25d52
Merge pull request #4878 from RalfJung/rustup
RalfJung Feb 28, 2026
a49c083
native-lib: better organize fn ptr tests
RalfJung Mar 1, 2026
71f4b75
native-lib: also test fn ptrs that are instances of generics
RalfJung Mar 1, 2026
1472b9f
Merge pull request #4880 from RalfJung/native-lib-fnptr
RalfJung Mar 1, 2026
a36fc5c
FCNTL F_SETFL Ignore creation flags
MousseARaser06 Feb 1, 2026
7dc80de
use ignorelist instead of allowlist for file flags
RalfJung Mar 1, 2026
0500cdc
Merge pull request #4881 from RalfJung/setfl
RalfJung Mar 1, 2026
7f3bbe3
Report unused features
mu001999 Feb 5, 2026
28b6bcb
Add tests for unused-features
mu001999 Feb 5, 2026
d0a182f
Remove unused features in compiler
mu001999 Mar 1, 2026
dc3db23
Slightly simplify write_bitcode_to_file handling
bjorn3 Feb 13, 2026
9e917ee
Replace spawn_named_thread method with thread_profiler
bjorn3 Feb 15, 2026
22d4bb2
Move print_pass_timings and print_statistics calls to rustc_interface
bjorn3 Feb 15, 2026
eff0d4c
Fuse codegen into LTO optimize methods
bjorn3 Feb 15, 2026
6ea5244
Move some methods to WriteBackendMethods
bjorn3 Feb 15, 2026
e78a9f7
enable `PassMode::Indirect { on_stack: true }` tail call arguments
folkertdev Mar 3, 2026
52b4de3
Abort after printing infinite type errors.
nnethercote Feb 27, 2026
ff3d308
Eliminate `Representability::Infinite`.
nnethercote Feb 27, 2026
cbd443d
Remove unused features in tools
mu001999 Feb 12, 2026
7ffaa41
Remove unused features in library tests
mu001999 Feb 20, 2026
0436634
Remove unused features in tests
mu001999 Feb 28, 2026
b3434a2
Prepare for merging from rust-lang/rust
Mar 4, 2026
12dbc5e
Merge ref 'd933cf483edf' from rust-lang/rust
Mar 4, 2026
a512d62
Merge pull request #4884 from rust-lang/rustup-2026-03-04
oli-obk Mar 4, 2026
91c7627
Remove `cycle_fatal` query modifier
Zoxc Mar 2, 2026
ee855c0
Migrate `rustc_pattern_analysis` lint to `Diagnostic`
GuillaumeGomez Mar 4, 2026
c29a26e
Remove `LintDiagnostic` implementation on `rustc_middle::Deprecated`
GuillaumeGomez Mar 4, 2026
3d54209
Remove unused `LintDiagnostic` trait
GuillaumeGomez Mar 4, 2026
ab960af
Remove `LintDiagnostic` derive proc-macro
GuillaumeGomez Mar 4, 2026
930bbe4
Update `rustc-dev-guide` to remove mentions of `LintDiagnostic`
GuillaumeGomez Mar 4, 2026
7b76829
Remove mentions of `LintDiagnostic`
GuillaumeGomez Mar 4, 2026
8cd8c3e
Rollup merge of #152164 - mu001999-contrib:lint/unused_features, r=Jo…
JonathanBrouwer Mar 4, 2026
3a74e86
Rollup merge of #152801 - bjorn3:lto_refactors14, r=jackh726
JonathanBrouwer Mar 4, 2026
bf55dc0
Rollup merge of #153317 - nnethercote:abort-after-infinite-errors, r=…
JonathanBrouwer Mar 4, 2026
86c4961
Rollup merge of #153361 - folkertdev:tail-call-indirect-on-stack-true…
JonathanBrouwer Mar 4, 2026
d810e3c
Rollup merge of #153402 - RalfJung:miri, r=RalfJung
JonathanBrouwer Mar 4, 2026
1a0b912
Rollup merge of #153276 - Zoxc:rem-fatal-cycle, r=nnethercote
JonathanBrouwer Mar 4, 2026
1ea11f2
Rollup merge of #153401 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
JonathanBrouwer Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_gcc/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ use object::read::archive::ArchiveFile;
use rustc_codegen_ssa::back::lto::SerializedModule;
use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput, SharedEmitter};
use rustc_codegen_ssa::traits::*;
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file};
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, ModuleKind, looks_like_rust_object_file};
use rustc_data_structures::memmap::Mmap;
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_errors::{DiagCtxt, DiagCtxtHandle};
use rustc_log::tracing::info;
use rustc_session::config::Lto;
use tempfile::{TempDir, tempdir};

use crate::back::write::save_temp_bitcode;
use crate::back::write::{codegen, save_temp_bitcode};
use crate::errors::LtoBitcodeFromRlib;
use crate::{GccCodegenBackend, GccContext, LtoMode, to_gcc_opt_level};

Expand Down Expand Up @@ -112,7 +112,7 @@ pub(crate) fn run_fat(
shared_emitter: &SharedEmitter,
each_linked_rlib_for_lto: &[PathBuf],
modules: Vec<FatLtoInput<GccCodegenBackend>>,
) -> ModuleCodegen<GccContext> {
) -> CompiledModule {
let dcx = DiagCtxt::new(Box::new(shared_emitter.clone()));
let dcx = dcx.handle();
let lto_data = prepare_lto(cgcx, each_linked_rlib_for_lto, dcx);
Expand All @@ -132,12 +132,12 @@ pub(crate) fn run_fat(
fn fat_lto(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
_dcx: DiagCtxtHandle<'_>,
dcx: DiagCtxtHandle<'_>,
modules: Vec<FatLtoInput<GccCodegenBackend>>,
mut serialized_modules: Vec<(SerializedModule<ModuleBuffer>, CString)>,
tmp_path: TempDir,
//symbols_below_threshold: &[String],
) -> ModuleCodegen<GccContext> {
) -> CompiledModule {
let _timer = prof.generic_activity("GCC_fat_lto_build_monolithic_module");
info!("going for a fat lto");

Expand Down Expand Up @@ -260,7 +260,7 @@ fn fat_lto(
// of now.
module.module_llvm.temp_dir = Some(tmp_path);

module
codegen(cgcx, prof, dcx, module, &cgcx.module_config)
}

pub struct ModuleBuffer(PathBuf);
Expand Down
11 changes: 3 additions & 8 deletions compiler/rustc_codegen_gcc/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ use std::{env, fs};

use gccjit::{Context, OutputKind};
use rustc_codegen_ssa::back::link::ensure_removed;
use rustc_codegen_ssa::back::write::{
BitcodeSection, CodegenContext, EmitObj, ModuleConfig, SharedEmitter,
};
use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig};
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen};
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_errors::DiagCtxt;
use rustc_errors::DiagCtxtHandle;
use rustc_fs_util::link_or_copy;
use rustc_log::tracing::debug;
use rustc_session::config::OutputType;
Expand All @@ -20,13 +18,10 @@ use crate::{GccContext, LtoMode};
pub(crate) fn codegen(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
shared_emitter: &SharedEmitter,
dcx: DiagCtxtHandle<'_>,
module: ModuleCodegen<GccContext>,
config: &ModuleConfig,
) -> CompiledModule {
let dcx = DiagCtxt::new(Box::new(shared_emitter.clone()));
let dcx = dcx.handle();

let _timer = prof.generic_activity_with_arg("GCC_module_codegen", &*module.name);
{
let context = &module.module_llvm.context;
Expand Down
42 changes: 18 additions & 24 deletions compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ use rustc_codegen_ssa::{CompiledModule, CompiledModules, CrateInfo, ModuleCodege
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_data_structures::sync::IntoDynSyncSend;
use rustc_errors::DiagCtxtHandle;
use rustc_errors::{DiagCtxt, DiagCtxtHandle};
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
use rustc_middle::ty::TyCtxt;
use rustc_middle::util::Providers;
Expand Down Expand Up @@ -371,16 +371,6 @@ impl ExtraBackendMethods for GccCodegenBackend {
self.lto_supported.load(Ordering::SeqCst),
)
}

fn target_machine_factory(
&self,
_sess: &Session,
_opt_level: OptLevel,
_features: &[String],
) -> TargetMachineFactoryFn<Self> {
// TODO(antoyo): set opt level.
Arc::new(|_, _| ())
}
}

#[derive(Clone, Copy, PartialEq)]
Expand Down Expand Up @@ -429,7 +419,17 @@ impl WriteBackendMethods for GccCodegenBackend {
type ModuleBuffer = ModuleBuffer;
type ThinData = ();

fn run_and_optimize_fat_lto(
fn target_machine_factory(
&self,
_sess: &Session,
_opt_level: OptLevel,
_features: &[String],
) -> TargetMachineFactoryFn<Self> {
// TODO(antoyo): set opt level.
Arc::new(|_, _| ())
}

fn optimize_and_codegen_fat_lto(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
shared_emitter: &SharedEmitter,
Expand All @@ -438,7 +438,7 @@ impl WriteBackendMethods for GccCodegenBackend {
_exported_symbols_for_lto: &[String],
each_linked_rlib_for_lto: &[PathBuf],
modules: Vec<FatLtoInput<Self>>,
) -> ModuleCodegen<Self::Module> {
) -> CompiledModule {
back::lto::run_fat(cgcx, prof, shared_emitter, each_linked_rlib_for_lto, modules)
}

Expand All @@ -455,14 +455,6 @@ impl WriteBackendMethods for GccCodegenBackend {
unreachable!()
}

fn print_pass_timings(&self) {
unimplemented!();
}

fn print_statistics(&self) {
unimplemented!()
}

fn optimize(
_cgcx: &CodegenContext,
_prof: &SelfProfilerRef,
Expand All @@ -473,13 +465,13 @@ impl WriteBackendMethods for GccCodegenBackend {
module.module_llvm.context.set_optimization_level(to_gcc_opt_level(config.opt_level));
}

fn optimize_thin(
fn optimize_and_codegen_thin(
_cgcx: &CodegenContext,
_prof: &SelfProfilerRef,
_shared_emitter: &SharedEmitter,
_tm_factory: TargetMachineFactoryFn<Self>,
_thin: ThinModule<Self>,
) -> ModuleCodegen<Self::Module> {
) -> CompiledModule {
unreachable!()
}

Expand All @@ -490,7 +482,9 @@ impl WriteBackendMethods for GccCodegenBackend {
module: ModuleCodegen<Self::Module>,
config: &ModuleConfig,
) -> CompiledModule {
back::write::codegen(cgcx, prof, shared_emitter, module, config)
let dcx = DiagCtxt::new(Box::new(shared_emitter.clone()));
let dcx = dcx.handle();
back::write::codegen(cgcx, prof, dcx, module, config)
}

fn serialize_module(_module: Self::Module, _is_thin: bool) -> Self::ModuleBuffer {
Expand Down
11 changes: 6 additions & 5 deletions compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rustc_codegen_ssa::back::write::{
CodegenContext, FatLtoInput, SharedEmitter, TargetMachineFactoryFn,
};
use rustc_codegen_ssa::traits::*;
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file};
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, ModuleKind, looks_like_rust_object_file};
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::memmap::Mmap;
use rustc_data_structures::profiling::SelfProfilerRef;
Expand All @@ -24,7 +24,8 @@ use rustc_session::config::{self, Lto};
use tracing::{debug, info};

use crate::back::write::{
self, CodegenDiagnosticsStage, DiagnosticHandlers, bitcode_section_name, save_temp_bitcode,
self, CodegenDiagnosticsStage, DiagnosticHandlers, bitcode_section_name, codegen,
save_temp_bitcode,
};
use crate::errors::{LlvmError, LtoBitcodeFromRlib};
use crate::llvm::{self, build_string};
Expand Down Expand Up @@ -709,13 +710,13 @@ impl ModuleBufferMethods for ModuleBuffer {
}
}

pub(crate) fn optimize_thin_module(
pub(crate) fn optimize_and_codegen_thin_module(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
shared_emitter: &SharedEmitter,
tm_factory: TargetMachineFactoryFn<LlvmCodegenBackend>,
thin_module: ThinModule<LlvmCodegenBackend>,
) -> ModuleCodegen<ModuleLlvm> {
) -> CompiledModule {
let dcx = DiagCtxt::new(Box::new(shared_emitter.clone()));
let dcx = dcx.handle();

Expand Down Expand Up @@ -794,7 +795,7 @@ pub(crate) fn optimize_thin_module(
save_temp_bitcode(cgcx, &module, "thin-lto-after-pm");
}
}
module
codegen(cgcx, prof, shared_emitter, module, &cgcx.module_config)
}

/// Maps LLVM module identifiers to their corresponding LLVM LTO cache keys
Expand Down
15 changes: 5 additions & 10 deletions compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ pub(crate) fn save_temp_bitcode(
&module.name,
cgcx.invocation_temp.as_deref(),
);
write_bitcode_to_file(module, &path)
write_bitcode_to_file(&module.module_llvm, &path)
}

fn write_bitcode_to_file(module: &ModuleCodegen<ModuleLlvm>, path: &Path) {
fn write_bitcode_to_file(module: &ModuleLlvm, path: &Path) {
unsafe {
let path = path_to_c_string(&path);
let llmod = module.module_llvm.llmod();
let llmod = module.llmod();
llvm::LLVMWriteBitcodeToFile(llmod, path.as_ptr());
}
}
Expand Down Expand Up @@ -905,13 +905,8 @@ pub(crate) fn optimize(
let _handlers =
DiagnosticHandlers::new(cgcx, shared_emitter, llcx, module, CodegenDiagnosticsStage::Opt);

if config.emit_no_opt_bc {
let out = cgcx.output_filenames.temp_path_ext_for_cgu(
"no-opt.bc",
&module.name,
cgcx.invocation_temp.as_deref(),
);
write_bitcode_to_file(module, &out)
if module.kind == ModuleKind::Regular {
save_temp_bitcode(cgcx, module, "no-opt");
}

// FIXME(ZuseZ4): support SanitizeHWAddress and prevent illegal/unsupported opts
Expand Down
77 changes: 30 additions & 47 deletions compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,18 @@ pub(crate) use macros::TryFromU32;
#[derive(Clone)]
pub struct LlvmCodegenBackend(());

struct TimeTraceProfiler {
enabled: bool,
}
struct TimeTraceProfiler {}

impl TimeTraceProfiler {
fn new(enabled: bool) -> Self {
if enabled {
unsafe { llvm::LLVMRustTimeTraceProfilerInitialize() }
}
TimeTraceProfiler { enabled }
fn new() -> Self {
unsafe { llvm::LLVMRustTimeTraceProfilerInitialize() }
TimeTraceProfiler {}
}
}

impl Drop for TimeTraceProfiler {
fn drop(&mut self) {
if self.enabled {
unsafe { llvm::LLVMRustTimeTraceProfilerFinishThread() }
}
unsafe { llvm::LLVMRustTimeTraceProfilerFinishThread() }
}
}

Expand All @@ -122,54 +116,33 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
) -> (ModuleCodegen<ModuleLlvm>, u64) {
base::compile_codegen_unit(tcx, cgu_name)
}
fn target_machine_factory(
&self,
sess: &Session,
optlvl: OptLevel,
target_features: &[String],
) -> TargetMachineFactoryFn<Self> {
back::write::target_machine_factory(sess, optlvl, target_features)
}

fn spawn_named_thread<F, T>(
time_trace: bool,
name: String,
f: F,
) -> std::io::Result<std::thread::JoinHandle<T>>
where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
{
std::thread::Builder::new().name(name).spawn(move || {
let _profiler = TimeTraceProfiler::new(time_trace);
f()
})
}
}

impl WriteBackendMethods for LlvmCodegenBackend {
type Module = ModuleLlvm;
type ModuleBuffer = back::lto::ModuleBuffer;
type TargetMachine = OwnedTargetMachine;
type ThinData = back::lto::ThinData;
fn print_pass_timings(&self) {
let timings = llvm::build_string(|s| unsafe { llvm::LLVMRustPrintPassTimings(s) }).unwrap();
print!("{timings}");
fn thread_profiler() -> Box<dyn Any> {
Box::new(TimeTraceProfiler::new())
}
fn print_statistics(&self) {
let stats = llvm::build_string(|s| unsafe { llvm::LLVMRustPrintStatistics(s) }).unwrap();
print!("{stats}");
fn target_machine_factory(
&self,
sess: &Session,
optlvl: OptLevel,
target_features: &[String],
) -> TargetMachineFactoryFn<Self> {
back::write::target_machine_factory(sess, optlvl, target_features)
}
fn run_and_optimize_fat_lto(
fn optimize_and_codegen_fat_lto(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
shared_emitter: &SharedEmitter,
tm_factory: TargetMachineFactoryFn<LlvmCodegenBackend>,
exported_symbols_for_lto: &[String],
each_linked_rlib_for_lto: &[PathBuf],
modules: Vec<FatLtoInput<Self>>,
) -> ModuleCodegen<Self::Module> {
) -> CompiledModule {
let mut module = back::lto::run_fat(
cgcx,
prof,
Expand All @@ -184,7 +157,7 @@ impl WriteBackendMethods for LlvmCodegenBackend {
let dcx = dcx.handle();
back::lto::run_pass_manager(cgcx, prof, dcx, &mut module, false);

module
back::write::codegen(cgcx, prof, shared_emitter, module, &cgcx.module_config)
}
fn run_thin_lto(
cgcx: &CodegenContext,
Expand Down Expand Up @@ -214,14 +187,14 @@ impl WriteBackendMethods for LlvmCodegenBackend {
) {
back::write::optimize(cgcx, prof, shared_emitter, module, config)
}
fn optimize_thin(
fn optimize_and_codegen_thin(
cgcx: &CodegenContext,
prof: &SelfProfilerRef,
shared_emitter: &SharedEmitter,
tm_factory: TargetMachineFactoryFn<LlvmCodegenBackend>,
thin: ThinModule<Self>,
) -> ModuleCodegen<Self::Module> {
back::lto::optimize_thin_module(cgcx, prof, shared_emitter, tm_factory, thin)
) -> CompiledModule {
back::lto::optimize_and_codegen_thin_module(cgcx, prof, shared_emitter, tm_factory, thin)
}
fn codegen(
cgcx: &CodegenContext,
Expand Down Expand Up @@ -389,6 +362,16 @@ impl CodegenBackend for LlvmCodegenBackend {
(compiled_modules, work_products)
}

fn print_pass_timings(&self) {
let timings = llvm::build_string(|s| unsafe { llvm::LLVMRustPrintPassTimings(s) }).unwrap();
print!("{timings}");
}

fn print_statistics(&self) {
let stats = llvm::build_string(|s| unsafe { llvm::LLVMRustPrintStatistics(s) }).unwrap();
print!("{stats}");
}

fn link(
&self,
sess: &Session,
Expand Down
Loading
Loading