Commit Graph

7 Commits

Author SHA1 Message Date
Louis Dionne 01dbd5518a [cmake] Demote fatal error to a warning when we don't know the Apple SDK in use
Sometimes, we could be building for a platform where we don't link
compiler-rt, so being able to figure out the right compiler-rt suffix
isn't necessary, but we shouldn't fail the build.
2022-03-22 15:36:47 -04:00
Louis Dionne 8907302f88 [cmake] Handle iOS, watchOS and tvOS when finding compiler-rt on Apple
This patch uses CMAKE_OSX_SYSROOT, which should contain the SDK path
that we're building against on Apple platforms, to determine which
platform we are compiling for and set the compiler-rt suffix accordingly.

Differential Revision: https://reviews.llvm.org/D122161
2022-03-21 21:55:09 -04:00
Tobias Hieta 45ab1904b3 Correctly find builtins library with clang-cl
When using COMPILER_RT_USE_BUILTINS_LIBRARY=ON and clang-cl there
where several places where it didn't work as expected.

First -print-libgcc-file-name has to be prefixed with /clang:

Then the regex that matched the builtins library was wrong because
the builtins library is called clang_rt.builtins_<arch>.lib
and the regex only matched libclang_rt.builtins_arch.a

With this commit you can use a runtime build on Windows with this
option enabled.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D120698
2022-03-14 07:49:29 +01:00
Louis Dionne 17e53983b8 [NFC] Fix typo in CMake comment 2022-03-02 13:28:34 -05:00
Petr Hosek 22acda48ff [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
2021-10-27 17:53:03 -07:00
Petr Hosek ba4920e98e Revert "[CMake] Cache the compiler-rt library search results"
This reverts commit 0eed292fba, there
are compiler-rt build failures that appear to have been introduced
by this change.
2021-10-21 10:32:01 -07:00
Petr Hosek 0eed292fba [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
2021-10-18 14:44:07 -07:00