diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-20 15:20:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-20 15:20:12 -0700 |
| commit | 304e4082a0a50c2a6dfbba2a1985cf772edb9e73 (patch) | |
| tree | 959bfcee9176e487dfcd4488ada99364658f9a37 /lib/std/Build | |
| parent | fac120bc3ad58a10ab80952e42becd0084aec059 (diff) | |
| parent | ceff2782029672714ac2e04a7b3e25af23eb9a9b (diff) | |
| download | zig-304e4082a0a50c2a6dfbba2a1985cf772edb9e73.tar.gz zig-304e4082a0a50c2a6dfbba2a1985cf772edb9e73.zip | |
Merge pull request #15193 from davidgm94/dwarf-64-bit-format
Expose an option for producing 64-bit DWARF format
Diffstat (limited to 'lib/std/Build')
| -rw-r--r-- | lib/std/Build/CompileStep.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/Build/CompileStep.zig b/lib/std/Build/CompileStep.zig index 9340ec8d99..b71298ce6a 100644 --- a/lib/std/Build/CompileStep.zig +++ b/lib/std/Build/CompileStep.zig @@ -69,6 +69,7 @@ disable_stack_probing: bool, disable_sanitize_c: bool, sanitize_thread: bool, rdynamic: bool, +dwarf_format: ?std.dwarf.Format = null, import_memory: bool = false, /// For WebAssembly targets, this will allow for undefined symbols to /// be imported from the host environment. @@ -1450,6 +1451,13 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { try addFlag(&zig_args, "strip", self.strip); try addFlag(&zig_args, "unwind-tables", self.unwind_tables); + if (self.dwarf_format) |dwarf_format| { + try zig_args.append(switch (dwarf_format) { + .@"32" => "-gdwarf32", + .@"64" => "-gdwarf64", + }); + } + switch (self.compress_debug_sections) { .none => {}, .zlib => try zig_args.append("--compress-debug-sections=zlib"), |
