-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Pass name of object file to LLVM so it can correctly emit S_OBJNAME in pdb files on Windows #115704
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
@rustbot label: + O-windows |
@rustbot label: +O-windows |
r? rust-lang/wg-llvm |
Rather than testing for the specific output (i.e. "does
Which seems overly complicated for our test, but maybe there's something we can do with debuginfo tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems alright, although one thing I want to bring up from my previous experience with the similar code is: please make sure if the paths are expected to be relative or absolute and that our implementation here matches the ecosystem's convention.
On my windows machine both paths (the one that already was present and the one I am adding) are excatly the same. They are both absolute paths and use backslashes. As far as I understand the reason for having it twice is that they may differ if the obj file gets moved before it is passed to the linker. |
@nagisa I am a bit unsure if I am supposed do something. |
☔ The latest upstream changes (presumably #115911) made this pull request unmergeable. Please resolve the merge conflicts. |
Ah, sorry I missed the notification earlier. It would still be good to add a behavioural test, if only to ensure this behaviour does not regress, but I'm also alright with marking the issue this fixes as E-needstest. But if there is truly no good way to write one down neatly, then its fine to not pursue it. r=me (you'll need to rebase and ping somebody to say |
@bors r- (ah, you shouldn't have reacted, bors T_T) |
This comment has been minimized.
This comment has been minimized.
Rebased, and checked the code again. Regarding tests, I think it would be best to mark the issue with E-needstest. A test for this pr would require checking which .o files got produced and check if a path to those exists in the right places. Ideally, doing linking in an extra step so I can validate correct behaviour if the .o files got moved before linking. I feel this would take me a long time to figure out and/or might be a bigger change to compiletest. Ideally like to wait until #113026 lands, which should make this easier, potentially allowing including a pdb parsing lib. @rustbot review |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6f13ea0): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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: 630.824s -> 630.479s (-0.05%) |
This should be the remaining fix to close #96475
Setting ObjectFilenameForDebug in llvm::TargetOptions, so llvm it can emit S_OBJNAME in pdb files on Windows.
Without a proper pdb parsing I am not able to add a unit test for this. The string is already appearing in the pdb file so I cannot just use grep.
@rustbot label: +A-debuginfo