-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add llvm debuginfo configure option #37742
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (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. |
There’s at least two things missing:
|
Note that rustbuild already includes support for So the only thing to be done for rustbuild (I think) is to add a line like ("LLVM_DEBUGINFO", self.llvm_release_debuginfo), here: https://github.com/rust-lang/rust/blob/master/src/bootstrap/config.rs#L342 |
@TimNN hmm, should I change the name of the |
update_with_config_mk() needs to read the new llvm debuginfo config option from config.mk. Other than that, rustbuild already supports LLVM's RelWithDebInfo build type.
@mrhota: I'm honestly not sure. When choosing the name for rustbuild, I went with So one could argue to use I think I would just stay with |
@nagisa After glancing through the code, I don't think |
@TimNN hehe too late! 😄 I decided to go with your name: I agree it's more accurate. Moreover, it seems like maybe we're moving toward deprecating the configure system, so option names there might be less important. /me shrugs. |
cc @alexcrichton I think this is complete, but I might have missed something (esp. in rustbuild). Thoughts? |
📌 Commit d3574b8 has been approved by |
Add llvm debuginfo configure option CC @nnethercote @Mark-Simulacrum We add a new configure option, `--enable-llvm-debuginfo`, to do exactly what you'd think. Re: #31033 Fixes #37738
Note to anyone following along: the final name chosen for the configure option was --enable-llvm-release-debuginfo. |
I just tried this option. I'm using configure/make to build, not rustbuild. It's not working, as far as I can tell. I did "make clean", configured with Is there some way I can check the resulting rustc binary for the debuginfo? I'm on Linux. |
@nnethercote: I haven't used the make based system in a long time, however I think that |
@TimNN @nnethercote there is a |
Deleting the build dir fixes the problem -- I'm now getting files and line numbers for LLVM in my profiling output. Thanks! |
CC @nnethercote @Mark-Simulacrum
We add a new configure option,
--enable-llvm-debuginfo
, to do exactly what you'd think.Re: #31033
Fixes #37738