aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-20 15:20:12 -0700
committerGitHub <noreply@github.com>2023-04-20 15:20:12 -0700
commit304e4082a0a50c2a6dfbba2a1985cf772edb9e73 (patch)
tree959bfcee9176e487dfcd4488ada99364658f9a37 /src/codegen
parentfac120bc3ad58a10ab80952e42becd0084aec059 (diff)
parentceff2782029672714ac2e04a7b3e25af23eb9a9b (diff)
downloadzig-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 'src/codegen')
-rw-r--r--src/codegen/llvm.zig2
-rw-r--r--src/codegen/llvm/bindings.zig2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 47b47cc807..a081448155 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -433,7 +433,7 @@ pub const Object = struct {
if (!options.strip) {
switch (options.target.ofmt) {
.coff => llvm_module.addModuleCodeViewFlag(),
- else => llvm_module.addModuleDebugInfoFlag(),
+ else => llvm_module.addModuleDebugInfoFlag(options.dwarf_format == std.dwarf.Format.@"64"),
}
const di_builder = llvm_module.createDIBuilder(true);
opt_di_builder = di_builder;
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index 63cac80db8..55f0ba8963 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -409,7 +409,7 @@ pub const Module = opaque {
extern fn LLVMSetTarget(M: *Module, Triple: [*:0]const u8) void;
pub const addModuleDebugInfoFlag = ZigLLVMAddModuleDebugInfoFlag;
- extern fn ZigLLVMAddModuleDebugInfoFlag(module: *Module) void;
+ extern fn ZigLLVMAddModuleDebugInfoFlag(module: *Module, dwarf64: bool) void;
pub const addModuleCodeViewFlag = ZigLLVMAddModuleCodeViewFlag;
extern fn ZigLLVMAddModuleCodeViewFlag(module: *Module) void;