-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Skip passing /natvis to lld-link until supported. #44626
Skip passing /natvis to lld-link until supported. #44626
Conversation
LLVM 5.0.0's lld-link frontend errors out if passed /natvis. LLVM 6 (maybe earlier?) should at least ignore the flag. Hopefully LLVM will eventually support the flag, at which point this workaround can perhaps be simply removed, if 6? is old enough.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @michaelwoerister (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ Thanks a lot! |
📌 Commit 995f0bd has been approved by |
@bors rollup |
…ssion-fix, r=michaelwoerister Skip passing /natvis to lld-link until supported. ### Overview Teaching rustc about MSVC's undocumented linker flag, /NATVIS, broke rustc's compatability with LLVM's `lld-link` frontend, as it does not recognize the flag. This pull request works around the problem by excluding `lld-link` by name. @retep998 discovered this regression. ### Possible Issues - Other linkers that try to be compatible with the MSVC linker flavor may also be broken and in need of workarounds. - Warning about the workaround may be overkill for a minor reduction in debug functionality. - Depending on how long this workaround sticks around, it may eventually be preferred to version check `lld-link` instead of assuming all versions are incompatible. ### Relevant issues * Broke in rust-lang#43221 Embed MSVC .natvis files into .pdbs and mangle debuginfo for &str, *T, and [T]. * LLVM patched in llvm-mirror/lld@27b9c42 to ignore the flag instead of erroring. r? @michaelwoerister
This seems to be supported in lld now: https://reviews.llvm.org/rL327895 |
Nice!
EDIT: Someone beat me to it: #59441 - rustc 1.35.0+ should start using the flag again and LLVM 7+ should actually embed the PDBs instead of just ignoring them like LLVM 6+. |
Overview
Teaching rustc about MSVC's undocumented linker flag, /NATVIS, broke rustc's compatability with LLVM's
lld-link
frontend, as it does not recognize the flag. This pull request works around the problem by excludinglld-link
by name. @retep998 discovered this regression.Possible Issues
lld-link
instead of assuming all versions are incompatible.Relevant issues
r? @michaelwoerister