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

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 28 09:57:05 PDT 2023


phosek created this revision.
phosek added reviewers: smeenai, beanz.
Herald added subscribers: Enna1, abrachet, dberris.
Herald added a project: All.
phosek requested review of this revision.
Herald added projects: clang, Sanitizers.
Herald added subscribers: Sanitizers, cfe-commits.

On Linux crt is typically use in combination with builtins. In the Clang
driver the use of builtins and crt is controlled by the --rtlib option.
Both builtins and crt also have similar build requirements where they
need to be built before any other runtimes and must avoid dependencies.
We also want builtins and crt these to be buildable separately from the
rest of compiler-rt for bootstrapping purposes. Given how simple crt is,
rather than maintaining a separate directory with its own separate build
setup, it's more efficient to just move crt into builtins. We still use
separate CMake option to control whether to built crt same as before.

      

This is an alternative to D89492 <https://reviews.llvm.org/D89492> and D136664 <https://reviews.llvm.org/D136664>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153989

Files:
  clang/cmake/caches/Fuchsia-stage2.cmake
  compiler-rt/CMakeLists.txt
  compiler-rt/cmake/builtin-config-ix.cmake
  compiler-rt/lib/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/builtins/crtbegin.c
  compiler-rt/lib/builtins/crtend.c
  compiler-rt/lib/crt/CMakeLists.txt
  compiler-rt/lib/crt/crtbegin.c
  compiler-rt/lib/crt/crtend.c
  compiler-rt/test/CMakeLists.txt
  compiler-rt/test/builtins/CMakeLists.txt
  compiler-rt/test/builtins/Unit/ctor_dtor.c
  compiler-rt/test/builtins/Unit/dso_handle.cpp
  compiler-rt/test/builtins/Unit/lit.cfg.py
  compiler-rt/test/builtins/Unit/lit.site.cfg.py.in
  compiler-rt/test/crt/CMakeLists.txt
  compiler-rt/test/crt/ctor_dtor.c
  compiler-rt/test/crt/dso_handle.cpp
  compiler-rt/test/crt/lit.cfg.py
  compiler-rt/test/crt/lit.site.cfg.py.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153989.535450.patch
Type: text/x-patch
Size: 19977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230628/550ebbbc/attachment-0001.bin>


More information about the cfe-commits mailing list