diff options
author | Shoaib Meenai <smeenai@fb.com> | 2020-04-23 21:19:11 -0700 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2020-04-30 15:42:32 -0700 |
commit | cc259638cb41bb4c80e98a00e61387a5ff5ca490 (patch) | |
tree | b947d214fb5ae2f79e4cc7787beab6cfd201c18d /libcxxabi/cmake | |
parent | c14ac8043ed1d8128e515c88e78186dd1ca5a655 (diff) | |
download | llvm-cc259638cb41bb4c80e98a00e61387a5ff5ca490.tar.gz |
[libcxx][libcxxabi][libunwind] Use libgcc on Android
Android doesn't have a libgcc_s and uses libgcc instead, so adjust the
build accordingly. This matches compiler-rt's build setup. libc++abi and
libunwind were already checking for libgcc but in a different context.
This change makes them search only for libgcc on Android now, but the
code to link against libgcc if it were present was already there.
Reviewed By: #libc, #libc_abi, #libunwind, rprichard, srhines
Differential Revision: https://reviews.llvm.org/D78787
Diffstat (limited to 'libcxxabi/cmake')
-rw-r--r-- | libcxxabi/cmake/config-ix.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake index 8892964ad376..15b52083fee2 100644 --- a/libcxxabi/cmake/config-ix.cmake +++ b/libcxxabi/cmake/config-ix.cmake @@ -6,8 +6,12 @@ include(CheckCSourceCompiles) check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB) if (NOT LIBCXXABI_USE_COMPILER_RT) - check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB) - check_library_exists(gcc __aeabi_uldivmod "" LIBCXXABI_HAS_GCC_LIB) + if (ANDROID) + check_library_exists(gcc __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_LIB) + else () + check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB) + check_library_exists(gcc __aeabi_uldivmod "" LIBCXXABI_HAS_GCC_LIB) + endif () endif () # libc++abi is built with -nodefaultlibs, so we want all our checks to also |