mirror of
https://github.com/ziglang/zig.git
synced 2026-02-07 15:07:12 +00:00
Windows: Explicitly pass PDB paths to lld-link
On Windows, lld-link resolves PDB output paths using `/` and embeds the result in the final executable, which breaks some native tooling like WPR/WPA. This commit overrides the default behavior of lld-link by explicitly setting the output PDB filename and binary-embedded path.
This commit is contained in:
parent
2d5fbbb44e
commit
dd8df1caf3
@ -181,6 +181,13 @@ pub fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Nod
|
||||
try argv.append("-NOLOGO");
|
||||
if (!self.base.options.strip) {
|
||||
try argv.append("-DEBUG");
|
||||
|
||||
const out_ext = std.fs.path.extension(full_out_path);
|
||||
const out_pdb = try allocPrint(arena, "{s}.pdb", .{
|
||||
full_out_path[0 .. full_out_path.len - out_ext.len],
|
||||
});
|
||||
try argv.append(try allocPrint(arena, "-PDB:{s}", .{out_pdb}));
|
||||
try argv.append(try allocPrint(arena, "-PDBALTPATH:{s}", .{out_pdb}));
|
||||
}
|
||||
if (self.base.options.lto) {
|
||||
switch (self.base.options.optimize_mode) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user