-
Notifications
You must be signed in to change notification settings - Fork 171
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
Why do we build compiler-rt/libcxx/libcxxabi with RelWithDebugInfo? #281
Comments
I think if you don't want debug info in your binary you probably want to either link with The alternative is that we ship two copies of all the libraries, one with debug and one without, but that adds complexity we probably don't want. |
It seems to me that consumers of debug flavored sysroot will tend to build their own sysroot anyway (with |
I don't have a strong opinion. It does main that anyone who builds a debug binary won't be able to step into any system functions, but maybe that fine/normal/expected? |
Note that |
I see, perhaps that should be built with debug info then? In emscripten we chose to build all libraries with debug info, and have the linker strip it when a release build is desired. It really depends how many wasi-sdk users will end up wanting to debug system library level stuff. |
Yes, the strip-at-link-time approach is reasonable. It's just that when debug info is enabled (at least via cmake |
Really? I thought that point of |
Really. See https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake#L59, by default |
We should probably be consistent about shipping debug info or not for all libraries. Being consistent about optimization levels isn't critical I think, but it should be done deliberately. There may be some part of libc/compiler-rt/libc++ that would be best built with |
One thing I forgot to mention in the previous discussions: shipping sysroots with debug info doesn't really allow one to debug them, because the dwarf sections do not embed the source code (even with |
Okay, so that is inconvenient, but when you're trying to make sense of a stack trace you don't absolutely need to see source files in your debugger. (Note to self: figure out how debian could ship source suitable for debugging sometime...) |
Why are we building them with
RelWithDebugInfo
instead ofRelease
? Apart from lower optimization level, it causes dwarf sections to be linked into the final wasm with default linking flags, which IMHO is not desirable for mostwasi-sdk
users.The text was updated successfully, but these errors were encountered: