[PATCH] D144889: [C2x] Support <string.h> in freestanding

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 28 09:59:36 PST 2023


jyknight added a comment.

> On the other hand, I think a not-insignificant number of users are interested in freestanding environments for one-off/fun/experimental projects where ease of access is more important than performance characteristics -- think: users who are playing around with an arduino, etc.

I agree. But, I see no reason that building the micro-libc for a given target should be any more onerous than building the compiler-rt builtins for said target -- which you already need to do! And it doesn't actually help to make micro-libc _less_ onerous to build than compiler-rt builtins, since you also need that...

Of course, building compiler-rt builtins actually IS rather onerous for users at the moment. This is quite unfortunate, and we should definitely improve the experience of that. And then do the same thing for any micro-libc target. (I think it might go a long way to do something along the lines of distributing target-independent sources and a _trivial_ standalone builtins build script with Clang, such that a user could on-demand build a libclang_builtins.a for any target configuration they wish to use. But that's really a topic for a different thread.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144889/new/

https://reviews.llvm.org/D144889



More information about the cfe-commits mailing list