cjacek wrote: > Hmm, so a "regular" mingw object file would end up having both DWARF (if > building with -g) and codeview (for the compiler info)?
Yes. > Does this cause confusion when linking (probably not, as it would either > retain the DWARF or the codeview parts, depending on linker arguments I > guess)? I don’t think it should cause any confusion, and my testing confirms that. LLD stores debug chunks separately when reading COFF files in `ObjFile::readSection`, and only uses them when generating a PDB file, based on the command-line arguments. I’m less familiar with binutils, but it also appears to condition PDB generation on command-line options and discards CodeView sections [based on their names](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=ld/scripttempl/pe.sc;h=96a47515444a3a1e03a9e787287a518898e1ee87;hb=HEAD#l227). > AFAIK only recent GCC toolchain supports codeview. I am not sure GDB even > does, so this could be a problem. The discard I mentioned above appears to predate CodeView support, git blame shows it was part of the initial import to CVS in 1999. Note that with this change, we’d still use DWARF by default for actual debug info on MinGW; the CodeView compiler info is just an addition. https://github.com/llvm/llvm-project/pull/142970 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits