Skip to content
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

--enable-debuginfo does not enable LLVM debug info #31033

Closed
nagisa opened this issue Jan 19, 2016 · 12 comments
Closed

--enable-debuginfo does not enable LLVM debug info #31033

nagisa opened this issue Jan 19, 2016 · 12 comments

Comments

@nagisa
Copy link
Member

nagisa commented Jan 19, 2016

According to this code we only enable LLVM debug-info when --disable-llvm-optimize is set. We should also enable LLVM debug info when --enable-debuginfo is set.

@KalitaAlexey
Copy link
Contributor

What you suggest to do if I need rust debug info, but not need LLVM debug info?

@frewsxcv
Copy link
Member

Sort of related #24840

@nagisa nagisa added the A-build label Jan 21, 2016
@mrhota
Copy link
Contributor

mrhota commented Nov 12, 2016

For future travelers, I came here after reading @nnethercote's blog post about perf testing and profiling: https://blog.mozilla.org/nnethercote/2016/10/14/how-to-speed-up-the-rust-compiler/

At the end he mentioned treating LLVM like a black box because he didn't yet know how to enable debuginfo in LLVM itself. Well, it looks like @nagisa's comment resolves that mystery. Except it looks like the option is actually called --disable-optimize-llvm.

@Mark-Simulacrum
Copy link
Member

That option sounds like it disables optimizations, though...

@mrhota
Copy link
Contributor

mrhota commented Nov 12, 2016

@Mark-Simulacrum Indeed. And in fact, you can --enable-optimize and --enable-debug for rustc

Perhaps bundling up LLVM debuginfo with LLVM de-optimization is no good.

Maybe --disable-optimize-llvm should merely disable optimized LLVM, and user should specify --enable-llvm-debuginfo independently if desired.

@mrhota
Copy link
Contributor

mrhota commented Nov 12, 2016

In configure, it looks like CMAKE_BUILD_TYPE=RelWithDebInfo corresponds to --enable-optimize-llvm and the hypothetical --enable-llvm-debuginfo while CMAKE_BUILD_TYPE=Debug corresponds to --disable-optimize-llvm.

@nnethercote
Copy link
Contributor

Should we file a new issue to make it easier to build LLVM with optimizations and debuginfo?

@mrhota
Copy link
Contributor

mrhota commented Nov 12, 2016

@nnethercote I intended to issue a PR referring here, but I'll defer to your judgment.

@nnethercote
Copy link
Contributor

Oh, if you have a PR there's no need for a separate issue. Thank you for doing it!

@mrhota
Copy link
Contributor

mrhota commented Nov 13, 2016

Oh, I think I just misunderstood your intention, given the title of this issue is slightly broader in intent than the conclusion I came to with my PR. Well, I'm not sure how to dispose of the two issues. Close this one, maybe?

bors added a commit that referenced this issue Nov 15, 2016
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
@mrhota
Copy link
Contributor

mrhota commented Nov 15, 2016

@nagisa I added support for llvm debuginfo in a release build via a specific build option in #37742. This issue might be obsolete now. Want to close it?

@nagisa
Copy link
Member Author

nagisa commented Nov 16, 2016

Yeah, that PR seems good enough of a fix.

@nagisa nagisa closed this as completed Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants