mirror of
https://github.com/ziglang/zig.git
synced 2026-01-03 20:13:21 +00:00
stage2: add support for assembly debug info
Pulls out the -g cc flag addition to the common area so that it is also applied to assembly files.
This commit is contained in:
parent
54eb0f2daa
commit
0d92c2ca5b
@ -4207,14 +4207,6 @@ pub fn addCCArgs(
|
||||
else => {},
|
||||
}
|
||||
|
||||
if (!comp.bin_file.options.strip) {
|
||||
switch (target.ofmt) {
|
||||
.coff => try argv.append("-gcodeview"),
|
||||
.elf, .macho => try argv.append("-gdwarf-4"),
|
||||
else => try argv.append("-g"),
|
||||
}
|
||||
}
|
||||
|
||||
if (target.cpu.arch.isThumb()) {
|
||||
try argv.append("-mthumb");
|
||||
}
|
||||
@ -4356,6 +4348,14 @@ pub fn addCCArgs(
|
||||
},
|
||||
}
|
||||
|
||||
if (!comp.bin_file.options.strip) {
|
||||
switch (target.ofmt) {
|
||||
.coff => try argv.append("-gcodeview"),
|
||||
.elf, .macho => try argv.append("-gdwarf-4"),
|
||||
else => try argv.append("-g"),
|
||||
}
|
||||
}
|
||||
|
||||
if (target_util.llvmMachineAbi(target)) |mabi| {
|
||||
try argv.append(try std.fmt.allocPrint(arena, "-mabi={s}", .{mabi}));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user