From 1c9c64b8b69c0ca5d23869ef9f8022c86aa7346d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 15 Dec 2024 05:59:34 +0100 Subject: [PATCH] compiler: Switch to DWARF 5 by default for zig cc and the LLVM backend. This is the same version we're targeting for the self-hosted backends. --- src/Compilation.zig | 2 +- src/codegen/llvm.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compilation.zig b/src/Compilation.zig index 1c4c97e06fb9..29c118fdedf9 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -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"), diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index b94ea0799573..3278569a8222 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -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") {