You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "anchao (via GitHub)" <gi...@apache.org> on 2024/07/05 13:44:43 UTC
[PR] sim/cmake: enable garbage collection of unused input sections [nuttx]
anchao opened a new pull request, #12634:
URL: https://github.com/apache/nuttx/pull/12634
## Summary
sim/cmake: enable garbage collection of unused input sections
enable --gc-sections for linker
enable -ffunction-sections -fdata-sections for compiler
Signed-off-by: chao an <an...@lixiang.com>
## Impact
N/A
## Testing
ci-check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sim/cmake: enable garbage collection of unused input sections [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12634:
URL: https://github.com/apache/nuttx/pull/12634
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sim/cmake: enable garbage collection of unused input sections [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12634:
URL: https://github.com/apache/nuttx/pull/12634#discussion_r1666857900
##########
arch/sim/src/cmake/Toolchain.cmake:
##########
@@ -94,6 +94,11 @@ else()
endif()
endif()
+if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS)
+ add_link_options(-Wl,--gc-sections)
+ add_compile_options(-ffunction-sections -fdata-sections)
Review Comment:
what's about Makefile
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sim/cmake: enable garbage collection of unused input sections [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #12634:
URL: https://github.com/apache/nuttx/pull/12634#discussion_r1666887939
##########
arch/sim/src/cmake/Toolchain.cmake:
##########
@@ -94,6 +94,11 @@ else()
endif()
endif()
+if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS)
+ add_link_options(-Wl,--gc-sections)
+ add_compile_options(-ffunction-sections -fdata-sections)
Review Comment:
Makefile has these flags but CMake not
https://github.com/apache/nuttx/blob/master/boards/sim/sim/sim/scripts/Make.defs#L117-L118
https://github.com/apache/nuttx/blob/master/boards/sim/sim/sim/scripts/Make.defs#L279
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org