| ... | @@ -4483,7 +4483,11 @@ pub fn addCCArgs( | ... | @@ -4483,7 +4483,11 @@ pub fn addCCArgs( |
| 4483 | | 4483 | |
| 4484 | if (!comp.bin_file.options.strip) { | 4484 | if (!comp.bin_file.options.strip) { |
| 4485 | switch (target.ofmt) { | 4485 | switch (target.ofmt) { |
| 4486 | .coff => try argv.append("-gcodeview"), | 4486 | .coff => { |
| | 4487 | // -g is required here because -gcodeview doesn't trigger debug info |
| | 4488 | // generation, it only changes the type of information generated. |
| | 4489 | try argv.appendSlice(&.{ "-g", "-gcodeview" }); |
| | 4490 | }, |
| 4487 | .elf, .macho => try argv.append("-gdwarf-4"), | 4491 | .elf, .macho => try argv.append("-gdwarf-4"), |
| 4488 | else => try argv.append("-g"), | 4492 | else => try argv.append("-g"), |
| 4489 | } | 4493 | } |