-
Couldn't load subscription status.
- Fork 34
Disable debug symbols in picolibc builds #117
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
Disable debug symbols in picolibc builds #117
Conversation
Change-Id: Ie4da7fd0209b6cc613c0cf148a9408492495ef8b
|
Do we want to disable the debug symbols for all build types, or only for release builds? |
|
Build types: do you mean that we have Then yes, both. I believe that the debug symbols are not usable anyway because they refer to source files from the build server. There may be a separate question if we want to make it possible to rebuild libraries locally with usable symbols - not sure that we have an immediate use case for that. |
|
Meson looks to have some strange interaction with buildtype and debug I think buildtype=release would use O3 and disable debug I think it is reasonable to have the library debug settings separate from the tools. I think if a developer wants picolibc debug then they can alter the buildscript. |
this was my reading of the docs as well, but still variants built with release had debug symbols included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm comfortable with turning off debug for the libraries build. It is the only option that is documented to work with both a buildtype of minsize and release.
There's a possibility that we could detect if the CMake build type is debug and only put this in if that's the case, but I expect debugging the tools to be a separate use case from debugging the libraries. Perhaps in future we could add a separate PICOLIBC_DEBUG variable if needed.
|
Would it help if we derive picolibc debug symbols option value based on CMAKE_BUILD_TYPE? Should be straightforward to do. |
Personally I don't think its worth it. It may be a bit more work than that if we want to try and map the CMAKE_BUILD_TYPEs to meson. Thinking of what would happen for llvm-project libraries. As I understand it they would inherit the CMAKE_BUILD_TYPE value that is used for the tools. However for picolibc we hard code the optimisation level on a per library level. I think we could simply map meson's debug=true to CMAKE_BUILD_TYPE=Debug or CMAKE_BUILD_TYPE=RelWithDebInfo without tinkering with the optimization option. However that won't make for a good debugging experience, Ideally we'd want to turn off optimization with CMAKE_BUILD_TYPE=Debug. That would mean overriding the per-library choice. |
No description provided.