[PATCH] D153989: [compiler-rt] Move crt into builtins

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 23:50:56 PDT 2023


phosek added a comment.

In D153989#4492229 <https://reviews.llvm.org/D153989#4492229>, @arichardson wrote:

> I think reduplication of build logic makes sense but these are conceptually separate things. The compiler rt builtins are needed in many cases where the C start-up code isn't (e.g. baremetal OS code). Would moving it to a subdirectory of builtins/ work too? That way it's clearer which source files and tests are part of each component?

That's certainly possible, although I'd also argue that `crtbegin.c` and `crtend.c` isn't the only code in builtins directory that fits into this category (that is not needed in environments like baremetal, requiring C library): for example `atomic*.c`, `os_version_check.c`, `emutls.c`, `enable_execute_stack.c`, `eprintf.c`, `gcc_personality_v0.c`, `clear_cache.c` and probably some more that I missed. If we're going to reorganize things, we should probably do it more holistically.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153989



More information about the cfe-commits mailing list