-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
libc/picolibc: Split hooks into separate files #81105
Conversation
This splits the picolibc helper functions into separate files instead of smashing them all together. Signed-off-by: Keith Packard <[email protected]>
I'm wondering if it's necessary. |
Not really? It makes the code a bit easier to manage as the files are shorter and have more obvious content. |
zephyr_library_sources(libc-hooks.c) | ||
|
||
# Do not allow LTO when compiling libc-hooks.c file | ||
set_source_files_properties(libc-hooks.c PROPERTIES COMPILE_OPTIONS $<TARGET_PROPERTY:compiler,prohibit_lto>) |
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.
This is not needed anymore?
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 inherited this piece from newlib/CMakeLists.txt and I have no idea what it is supposed to do. There's certainly no code in this library which needs to be protected from LTO; usually that's used to avoid letting the compiler elide calls to things like memset when storage is freed or other similar operations.
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.
Fair enough. From the commit message it kind of seemed like it may have been an oversight to remove this :)
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.
yeah, I hadn't remembered that part of the change as I did this a long time ago. Good to review and make sure nothing got missed.
This splits the picolibc helper functions into separate files instead of smashing them all together. No functional changes are intended, this is just simple cleanup.