-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link.exe: Don't embed full path to PDB file in binary. #121297
Conversation
#122306 updated backtrace-rs to a version that includes rust-lang/backtrace-rs#584, so this is unblocked now. @rustbot ping windows r? compiler |
Hey Windows Group! This bug has been identified as a good "Windows candidate". cc @albertlarsan68 @arlosi @ChrisDenton @danielframpton @gdr-at-ms @kennykerr @luqmana @lzybkr @nico-abram @retep998 @sivadeilra @wesleywiser |
@bors rollup=never since this touching an |
Looks good! |
r? compiler |
Thanks @michaelwoerister for fixing this and landing that fix to backtrace-rs to unblock it! @bors r+ |
Merged and backtrace has been updated, so this can land, yep. |
…=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](rust-lang#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#87825
💔 Test failed - checks-actions |
r? @wesleywiser Let's see if this is the same i686 backtracing issue already encountered in rust-lang/backtrace-rs#584, where backtracing was pretty flaky without frame pointers enabled. |
@bors r=wesleywiser |
…=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](rust-lang#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#87825
💔 Test failed - checks-actions |
d3af77c
to
0a094ba
Compare
I modified the test code in 0a094ba, so that unwinding will more reliably produce a stack trace that actually contains frames from the test. Unwinding not always working is a pre-existing issue on |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c5b5713): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 671.321s -> 670.605s (-0.11%) |
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 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 if it is in the same directory as the binary.r? @ghost
Fixes #87825