[CMake] Cache the compiler-rt library search results
authorPetr Hosek <phosek@google.com>
Tue, 29 Sep 2020 00:37:20 +0000 (17:37 -0700)
committerPetr Hosek <phosek@google.com>
Thu, 28 Oct 2021 00:53:03 +0000 (17:53 -0700)
commit22acda48ff32712746dad3079579f03c6e89e04c
tree133ee535e2bdbdadb5d302610759daf9bf883dbe
parent22bd75be7074c49209890182f4d69d7ab1d2d972
[CMake] Cache the compiler-rt library search results

There's a lot of duplicated calls to find various compiler-rt libraries
from build of runtime libraries like libunwind, libc++, libc++abi and
compiler-rt. The compiler-rt helper module already implemented caching
for results avoid repeated Clang invocations.

This change moves the compiler-rt implementation into a shared location
and reuses it from other runtimes to reduce duplication and speed up
the build.

Differential Revision: https://reviews.llvm.org/D88458
17 files changed:
cmake/Modules/HandleCompilerRT.cmake [new file with mode: 0644]
compiler-rt/CMakeLists.txt
compiler-rt/cmake/Modules/AddCompilerRT.cmake
compiler-rt/cmake/Modules/HandleCompilerRT.cmake [deleted file]
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
libcxx/CMakeLists.txt
libcxx/cmake/Modules/HandleCompilerRT.cmake [deleted file]
libcxx/cmake/config-ix.cmake
libcxx/src/CMakeLists.txt
libcxxabi/CMakeLists.txt
libcxxabi/cmake/Modules/HandleCompilerRT.cmake [deleted file]
libcxxabi/cmake/config-ix.cmake
libcxxabi/src/CMakeLists.txt
libunwind/CMakeLists.txt
libunwind/cmake/Modules/HandleCompilerRT.cmake [deleted file]
libunwind/cmake/config-ix.cmake