aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-20 15:09:33 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-04-20 15:17:07 -0700
commitceff2782029672714ac2e04a7b3e25af23eb9a9b (patch)
tree959bfcee9176e487dfcd4488ada99364658f9a37 /src/codegen/llvm.zig
parentd026202a26e56e7e2ea20ca49509fdcf8b937020 (diff)
downloadzig-ceff2782029672714ac2e04a7b3e25af23eb9a9b.tar.gz
zig-ceff2782029672714ac2e04a7b3e25af23eb9a9b.zip
fixes to the previous commit
* CompileStep: Avoid calling producesPdbFile() to determine whether the option should be respected. If the user asks for it, put it on the command line and let the Zig CLI deal with it appropriately. * Make the namespace of `std.dwarf.Format.dwarf32` no longer have a redundant "dwarf" in it. * Add `zig cc` integration for `-gdwarf32` and `-gdwarf64`. * Toss in a bonus bug fix for `-gdwarf-2`, `-gdwarf-3`, etc. * Avoid using default init values for struct fields unnecessarily. * Add missing cache hash addition for the new option.
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 23d9af39e0..a081448155 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -433,14 +433,7 @@ pub const Object = struct {
if (!options.strip) {
switch (options.target.ofmt) {
.coff => llvm_module.addModuleCodeViewFlag(),
- else => {
- const dwarf_format = options.dwarf_format orelse .dwarf32;
- const produce_dwarf64 = switch (dwarf_format) {
- .dwarf32 => false,
- .dwarf64 => true,
- };
- llvm_module.addModuleDebugInfoFlag(produce_dwarf64);
- },
+ else => llvm_module.addModuleDebugInfoFlag(options.dwarf_format == std.dwarf.Format.@"64"),
}
const di_builder = llvm_module.createDIBuilder(true);
opt_di_builder = di_builder;