dblaikie added a comment. In implicit thinlto this seemed to work for me without any changes:
$ clang++-tot -flto=thin test.cpp -g -c $ clang++-tot -flto=thin -fuse-ld=lld -gsplit-dwarf test.o && llvm-dwarfdump-tot a.out a.out: file format elf64-x86-64 .debug_info contents: 0x00000000: Compile Unit: length = 0x0000002c, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x00000030) 0x0000000b: DW_TAG_compile_unit DW_AT_stmt_list (0x00000000) DW_AT_comp_dir ("/usr/local/google/home/blaikie/dev/scratch") DW_AT_GNU_dwo_name ("a.out_dwo/1.dwo") DW_AT_GNU_dwo_id (0xf29563d7c812deae) DW_AT_low_pc (0x0000000000201730) DW_AT_high_pc (0x0000000000201738) DW_AT_GNU_addr_base (0x00000000) Any idea why that worked without the need for a special case/changes? Might be nice if both these use cases (implicit and explicit thinlto) somehow managed to use more common code generation options. But I guess that's too different - probably some generic "take all the clang flags and pass them through to the linker to pass back to the compiler", which isn't really relevant to this... well, maybe (if they're being passed back to the compiler in implicit thin lto, how does implicit thin lto work correctly without the -g flag?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94647/new/ https://reviews.llvm.org/D94647 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits