Skip to content

Commit

Permalink
Auto merge of #121297 - michaelwoerister:set-pdb-alt-path, r=wesleywiser
Browse files Browse the repository at this point in the history
link.exe: Don't embed full path to PDB file in binary.

This PR makes `rustc` unconditionally pass `/PDBALTPATH:%_PDB%` to MSVC-style linkers, causing the linker to only embed the filename of the PDB in the binary instead of the full path. This will help implement the [trim-paths RFC](rust-lang/rust#111540) for `*-msvc` targets.

Passing `/PDBALTPATH:%_PDB%` to the linker is already done by many projects that need reproducible builds and [debugger's should still be able to find the PDB](https://learn.microsoft.com/cpp/build/reference/pdbpath) if it is in the same directory as the binary.

r? `@ghost`

Fixes rust-lang/rust#87825
  • Loading branch information
bors committed Mar 15, 2024
2 parents f0d344b + 7285311 commit da332f8
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit da332f8

Please sign in to comment.