[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>
Mon, 18 Oct 2021 21:44:07 +0000 (14:44 -0700)
commit0eed292fbae22a8856682b07e1cb968424b49941
tree0a22a4dca1a801811cdd716c77c517a7a880f34f
parent3be1f4b8fd53b42c412c307a2a377b0fd6e8cb76
[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