Use options debug format if it is provided (#21995)

Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
This commit is contained in:
Benjamin 2024-11-16 13:32:11 -06:00 committed by GitHub
parent ccf8488a1e
commit 7cc7ae1fd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -433,6 +433,7 @@ pub fn resolve(options: Options) ResolveError!Config {
const debug_format: DebugFormat = b: {
if (root_strip and !options.any_non_stripped) break :b .strip;
if (options.debug_format) |x| break :b x;
break :b switch (target.ofmt) {
.elf, .goff, .macho, .wasm, .xcoff => .{ .dwarf = .@"32" },
.coff => .code_view,