[all-commits] [llvm/llvm-project] b47bee: [compiler-rt] Move crt into builtins

Petr Hosek via All-commits all-commits at lists.llvm.org
Tue Jul 11 16:06:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b47beecc817155fa065272ceecdf5486e2bef36e
      https://github.com/llvm/llvm-project/commit/b47beecc817155fa065272ceecdf5486e2bef36e
  Author: Petr Hosek <phosek at google.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M compiler-rt/CMakeLists.txt
    M compiler-rt/cmake/builtin-config-ix.cmake
    M compiler-rt/lib/CMakeLists.txt
    M compiler-rt/lib/builtins/CMakeLists.txt
    A compiler-rt/lib/builtins/crtbegin.c
    A compiler-rt/lib/builtins/crtend.c
    R compiler-rt/lib/crt/CMakeLists.txt
    R compiler-rt/lib/crt/crtbegin.c
    R compiler-rt/lib/crt/crtend.c
    M compiler-rt/test/CMakeLists.txt
    M compiler-rt/test/builtins/CMakeLists.txt
    A compiler-rt/test/builtins/Unit/ctor_dtor.c
    A compiler-rt/test/builtins/Unit/dso_handle.cpp
    M compiler-rt/test/builtins/Unit/lit.cfg.py
    M compiler-rt/test/builtins/Unit/lit.site.cfg.py.in
    R compiler-rt/test/crt/CMakeLists.txt
    R compiler-rt/test/crt/ctor_dtor.c
    R compiler-rt/test/crt/dso_handle.cpp
    R compiler-rt/test/crt/lit.cfg.py
    R compiler-rt/test/crt/lit.site.cfg.py.in

  Log Message:
  -----------
  [compiler-rt] Move crt into builtins

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 and D136664.

Differential Revision: https://reviews.llvm.org/D153989




More information about the All-commits mailing list