about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-15 14:14:34 +0000
committerbors <bors@rust-lang.org>2024-03-15 14:14:34 +0000
commitc5b571310dc60c6a58c6505cce2fb7e2f3f9aa68 (patch)
tree628b99c5d1b6676ea7eba0db849dcafaee26612d /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentaccc516128b21e960b1a7af45393e9acdd184890 (diff)
parent0a094bae28a00117b99262621ff22876796d2885 (diff)
downloadrust-c5b571310dc60c6a58c6505cce2fb7e2f3f9aa68.tar.gz
rust-c5b571310dc60c6a58c6505cce2fb7e2f3f9aa68.zip
Auto merge of #121297 - michaelwoerister:set-pdb-alt-path, r=wesleywiser
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](https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/87825
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions