-
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
rustc: Work around DICompileUnit
bugs in LLVM
#46772
Conversation
Thanks, Alex! Do we have some kind of guarantee that the first I'm a bit wary of the consequences of this patch. LLVM does not crash any more but how much will it break line information? I'm OK with merging for now but before we make ThinLTO the default for release builds we should verify that backtraces and basic profiling still work. Also, we should really push for this being properly fixed in LLVM. |
Heh I was hoping you'd know more than I on those topics :) I'm not actually sure at all what
So given that the file doesn't exist I'd imagine that this wouldn't impact the experience too much. That being said though were there particular things you're worried about? The backtraces do indeed seem to work on OSX (don't have access to Linux right now) but this would also be pretty easy to verify after-the-fact of landing. |
The As far as paths go, we might be in the clear though, since all compile units from the same compilation session with have the same directory there. |
Ah excellent points @michaelwoerister! Useful to know for sure that I think in that case this may end up working out well? In debug mode this'll never happen because we only generate one codegen unit and ThinLTO isn't used, and then in optimized mode debuginfo is sort of sketchy anyway, but it'd only worsen the experience with debugging the inlined functions from other libraries I think? (which may not have been that great to begin with...) In that sense perhaps we should merge and see what happens? It's surely easy to turn off quickly :) |
Yes. If you could find a way to make sure that we keep the "main" |
2082c4e
to
20049c2
Compare
This commit implements a workaround for rust-lang#46346 which basically just avoids triggering the situation that LLVM's bug https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be found in the code itself but this commit is also intended to ... Closes rust-lang#46346
20049c2
to
e0ab5d5
Compare
@bors: r=michaelwoerister |
📌 Commit e0ab5d5 has been approved by |
rustc: Work around `DICompileUnit` bugs in LLVM This commit implements a workaround for #46346 which basically just avoids triggering the situation that LLVM's bug https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be found in the code itself but this commit is also intended to ... Closes #46346
☀️ Test successful - status-appveyor, status-travis |
…nagisa Work around invalid DWARF bugs for fat LTO This PR applies the same workaround in rust-lang#46772 to fat LTO. It seems to fix the bug reported in rust-lang#66118 (comment).
…nagisa Work around invalid DWARF bugs for fat LTO This PR applies the same workaround in rust-lang#46772 to fat LTO. It seems to fix the bug reported in rust-lang#66118 (comment).
This commit implements a workaround for #46346 which basically just
avoids triggering the situation that LLVM's bug
https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be
found in the code itself but this commit is also intended to ...
Closes #46346