Skip to content

Commit e332fb7

Browse files
committed
Add logging
1 parent 3232f9f commit e332fb7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/rustc_codegen_nvvm/src/link.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ fn codegen_into_ptx_file(
251251

252252
// object files (theyre not object files, they are impostors ඞ) are the bitcode modules produced by this codegen session
253253
// they *should* be the final crate.
254-
for obj in objects {
254+
for (i, obj) in objects.enumerate() {
255+
debug!("Reading object file {}: {:?}", i, obj);
255256
let bitcode = std::fs::read(obj)?;
256257
modules.push(bitcode);
257258
}

crates/rustc_codegen_nvvm/src/nvvm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ unsafe fn cleanup_dicompileunit(module: &Module) {
159159

160160
fn merge_llvm_modules(modules: Vec<Vec<u8>>, llcx: &Context) -> &Module {
161161
let module = unsafe { crate::create_module(llcx, "merged_modules") };
162-
for merged_module in modules {
162+
for (i, merged_module) in modules.iter().enumerate() {
163+
debug!("Merging object file #{}", i);
163164
unsafe {
164165
let tmp = LLVMRustParseBitcodeForLTO(
165166
llcx,

0 commit comments

Comments
 (0)