[clang] [llvm] [clang][Hexagon] Add Picolibc as part of triple (PR #169613)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 8 08:50:35 PST 2025


smithp35 wrote:

Not knowing the hexagon toolchain, I can't give you any useful comments on that part of the review. Based on our experience of Picolibc in the baremetal driver the question I have for you is whether there is enough picolibc specific details here to justify a specific picolibc environment.

It looks like the majority of the extra configuration that you are adding is not specific to picolibc, but could also apply to other bare-metal C-libraries like llvm libc and newlib. About the only thing that I can see that is Picolibc specific is adding crt-semihost.o for the startfiles. 

Would it be better to add this as a bare-metal configuration, not specific to picolibc, then you wouldn't need a new environment when changing C-library? 

FWIW. We require our users to use `-nostartfiles -lcrt-semihost` if they prefer the semihosting startup code (with semihosted argc, argv and return) and `lsemihost` for the semihost implementation.

It may also be useful to respond to https://discourse.llvm.org/t/rfc-add-command-line-option-for-selecting-c-library/87335 as the environment part is acting that way.

While I don't have any strong objections to adding picolibc as an evironment, there was some pushback to the RFC as there were so many bare-metal C-libraries, do we end up with an environment for each of them? With that in mind it may be better to split the generic triple parts out into a separate patch, to get more opinions on whether it is the right thing to do.




https://github.com/llvm/llvm-project/pull/169613


More information about the llvm-commits mailing list