Skip to content

Commit

Permalink
compiler: Switch to DWARF 5 by default for zig cc and the LLVM backend.
Browse files Browse the repository at this point in the history
This is the same version we're targeting for the self-hosted backends.
  • Loading branch information
alexrp committed Dec 15, 2024
1 parent af89bb0 commit 1c9c64b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Compilation.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5332,7 +5332,7 @@ pub fn addCCArgs(
argv.appendSliceAssumeCapacity(&.{ "-g", "-gcodeview" });
},
.dwarf => |f| {
argv.appendAssumeCapacity("-gdwarf-4");
argv.appendAssumeCapacity("-gdwarf-5");
switch (f) {
.@"32" => argv.appendAssumeCapacity("-gdwarf32"),
.@"64" => argv.appendAssumeCapacity("-gdwarf64"),
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/llvm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ pub const Object = struct {
module_flags.appendAssumeCapacity(try o.builder.metadataModuleFlag(
behavior_max,
try o.builder.metadataString("Dwarf Version"),
try o.builder.metadataConstant(try o.builder.intConst(.i32, 4)),
try o.builder.metadataConstant(try o.builder.intConst(.i32, 5)),
));

if (f == .@"64") {
Expand Down

0 comments on commit 1c9c64b

Please sign in to comment.