[PATCH] D28580: [CMake][libcxx] Check that we have libcxxabi before using it

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 15:17:18 PST 2017


phosek added a comment.

We now have basically 3 modes of operations when building libc++:

1. building libc++ as part of LLVM using projects/ when neither `LIBCXX_STANDALONE_BUILD` is nor `HAVE_LIBCXXABI` is defined, but we to link against libc++abi if it's available hence the `IS_DIRECTORY` check
2. building libc++ as part of LLVM using runtimes/ when `LIBCXX_STANDALONE_BUILD` is set and `HAVE_LIBCXXABI` will be set as well if libc++abi is being built as part of runtimes/ in which case we want to link against it
3. building libc++ standalone when only `LIBCXX_STANDALONE_BUILD` is set in which case we shouldn't be using libc++abi even if it's present (the `IS_DIRECTORY` is true) because it might not be built

With https://reviews.llvm.org/D28579, we'll be building libc++ for TSan as standalone, but since we aren't building libc++abi as well we shouldn't attempt to use even if it's in the tree hence the change in the condition.


Repository:
  rL LLVM

https://reviews.llvm.org/D28580





More information about the llvm-commits mailing list