[libcxx-commits] [PATCH] D82095: [libc++] Don't override LIBCXX_CXX_ABI_INCLUDE_PATHS for libcxxrt

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 18 07:34:51 PDT 2020


arichardson created this revision.
arichardson added reviewers: libc++, ldionne.
Herald added subscribers: libcxx-commits, dexonsmith, mgorny.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.

When testing libc++ for our cross-compiled CheriBSD target we specify an
explicit LIBCXX_CXX_ABI_INCLUDE_PATHS for libcxxrt. The hardcoded path
/usr/include/c++/v1 was introduced in 61e89737c5daf7b65341936f88f68efb680cdcd4 <https://reviews.llvm.org/rG61e89737c5daf7b65341936f88f68efb680cdcd4>
and overrides any value passed on the CMake command line. Fix this by using
it as a fallback rather than a fixed default value.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82095

Files:
  libcxx/cmake/Modules/HandleLibCXXABI.cmake


Index: libcxx/cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -116,7 +116,9 @@
     "-DLIBCXX_BUILDING_LIBCXXABI"
     "${shared}" "${static}" "cxxabi.h;__cxxabi_config.h" "")
 elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt")
-  set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
+  if(NOT LIBCXX_CXX_ABI_INCLUDE_PATHS)
+    set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
+  endif()
   setup_abi_lib(
     "-DLIBCXXRT"
     "cxxrt" "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82095.271706.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200618/8547a094/attachment.bin>


More information about the libcxx-commits mailing list