[libcxx-commits] [PATCH] D118503: [SystemZ][z/OS] Add ASCII and 32-bit variants for libc++.

Zibi Sarbino via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 15 07:04:38 PDT 2022


zibi marked 5 inline comments as done.
zibi added a comment.

Putting rational why I opted out for `LIBCXX_CXX_ABI=built-libcxxabi`.



================
Comment at: libcxx/cmake/Modules/HandleLibCXXABI.cmake:137
 # Link against a system-provided libc++abi
 elseif ("${LIBCXX_CXX_ABI}" STREQUAL "system-libcxxabi")
   add_library(libcxx-abi-headers INTERFACE)
----------------
Why do I need another `LIBCXX_CXX_ABI`?

The `system-libcxxabi` does not work for us since `imported_library` cannot find `libc++abi.so`. This is because `find_library` works only with `.x` extension whereas CMAKE_SHARED_LIBRARY_SUFFIX is set to `.so`. We could use `CMAKE_IMPORT_LIBRARY_SUFFIX` instead which on z/OS is `.x` however, cmake does not set `CMAKE_IMPORT_LIBRARY_SUFFIX` on other platforms (Linux on Power for example). 

Forcing `.x` extension and modifying `LIBCXX_CXX_ABI_LIBRARY_PATH` to point to previous build, which we want to reuse for ASCII build, the side deck `libc++abi.x` can be found however, the link step fails with:

`ninja: error: 'libcxx-abi-shared-NOTFOUND', needed by 'lib/libc++_a.so', missing and no known rule to make it`


Further by removing `target_link_libraries(cxx_shared PUBLIC libcxx-abi-shared)` will lead to 

The archive library liblibcxx-abi-shared.a cannot be found. 
This is because we have -llibcxx-abi-shared on the link step whereas we supposed to have <absolude path>/libc++abi.x in `LINK_LIBRARIES`.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118503



More information about the libcxx-commits mailing list