[PATCH] D74347: [CMake] Explicitly specify paths to libc++abi in CrossWinToARMLinux.cmake

Sergej Jaskiewicz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 15:33:02 PDT 2020


broadwaylamb updated this revision to Diff 249779.
broadwaylamb added a comment.

Add one more libc++abi header search path when building libc++

@vvereschaka this is supposed to fix the buildbot failure. It's more of a sweep under the rug type of fix. The real problem is that the value of the `CMAKE_SOURCE_DIR` variable is unexpected.

See for yourself.

Before 0197eac3330c04a49519f3e4dac38c4de605c654 <https://reviews.llvm.org/rG0197eac3330c04a49519f3e4dac38c4de605c654> I had the following in the build log:

  -- Looking for cxxabi.h in C:/buildbot/as-builder-1/llvm-clang-win-x-armv7l/llvm-project/libcxxabi/include - found

After (note the missing 'llvm-project' component in the path):

  -- Looking for cxxabi.h in C:/buildbot/as-builder-1/llvm-clang-win-x-armv7l/libcxxabi/include - not found

Maybe you have an idea of why this is happening? This all works fine on my machine even if I reproduce the directory layout used on the buildbot and invoke CMake from the `build` directory:

  llvm-clang-win-x-armv7l
  ├───build
  └───llvm-project


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74347/new/

https://reviews.llvm.org/D74347

Files:
  clang/cmake/caches/CrossWinToARMLinux.cmake


Index: clang/cmake/caches/CrossWinToARMLinux.cmake
===================================================================
--- clang/cmake/caches/CrossWinToARMLinux.cmake
+++ clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -83,6 +83,9 @@
 set(LIBCXX_TARGET_TRIPLE                    "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "")
 set(LIBCXX_SYSROOT                          "${DEFAULT_SYSROOT}" CACHE STRING "")
 set(LIBCXX_ENABLE_SHARED                    OFF CACHE BOOL "")
+set(LIBCXX_CXX_ABI                          "libcxxabi" CACHE STRING "")
+set(LIBCXX_CXX_ABI_INCLUDE_PATHS            "${CMAKE_SOURCE_DIR}/../libcxxabi/include;${CMAKE_SOURCE_DIR}/../llvm-project/libcxxabi/include" CACHE PATH "")
+set(LIBCXX_CXX_ABI_LIBRARY_PATH             "${CMAKE_BINARY_DIR}/lib/${CMAKE_C_COMPILER_TARGET}/c++" CACHE PATH "")
 
 set(BUILTINS_CMAKE_ARGS                     "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
 set(RUNTIMES_CMAKE_ARGS                     "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74347.249779.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200311/61abf5ea/attachment-0001.bin>


More information about the cfe-commits mailing list