[all-commits] [llvm/llvm-project] 36dde9: [SystemZ][z/OS] Add ASCII and 32-bit variants for ...

zibi2 via All-commits all-commits at lists.llvm.org
Mon Oct 3 15:24:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36dde913b0ff86ccdf09e0bc21421dce6a66f81d
      https://github.com/llvm/llvm-project/commit/36dde913b0ff86ccdf09e0bc21421dce6a66f81d
  Author: Zibi Sarbinowski <zibi at ca.ibm.com>
  Date:   2022-10-03 (Mon, 03 Oct 2022)

  Changed paths:
    M libcxx/CMakeLists.txt
    A libcxx/cmake/caches/s390x-ibm-zos-ascii.cmake
    A libcxx/cmake/caches/s390x-ibm-zos.cmake
    A libcxx/cmake/caches/s390x32-ibm-zos-ascii.cmake
    A libcxx/cmake/caches/s390x32-ibm-zos.cmake
    M libcxx/docs/BuildingLibcxx.rst
    M libcxx/src/CMakeLists.txt
    A libcxx/utils/zos_rename_dll_side_deck.sh
    M libcxxabi/CMakeLists.txt
    M libcxxabi/src/CMakeLists.txt

  Log Message:
  -----------
  [SystemZ][z/OS] Add ASCII and 32-bit variants for libc++.

This patch enables libc++ build as shared library in all combinations of ASCII/EBCDIC and 32-bit/64-bit variants. In particular it introduces:

  # ASCII version of libc++ named as libc++_a.so
  # Script to rename DLL name inside the generated side deck
  # Various names for dataset members where DLL libraries and their side decks will reside
  # Add the following options:

   - LIBCXX_SHARED_OUTPUT_NAME
   - LIBCXX_ADDITIONAL_COMPILE_FLAGS
   - LIBCXX_ADDITIONAL_LIBRARIES
   - LIBCXXABI_ADDITIONAL_COMPILE_FLAGS
   - LIBCXXABI_ADDITIONAL_LIBRARIES

**Background and rational of this patch**

The linker on z/OS creates a list of exported symbols in a file called side deck. The list contains the symbol name as well as the name of the DLL which implements the symbol. The name of the DLL depends on what is specified in the -o command line option. If it points to a USS file, than the DLL name in the side deck will be the USS file name. If it points to a member of a dataset then the DLL name in the side deck is the member name.

If CMake could deal with z/OS datasets we could use -o that points to a dataset member name, but this does not seem to work so we have to produce a USS file as the DLL and then copy the content of the produced side deck to a dataset as well as rename the USS file name in the side deck to a dataset member name that corresponds to that DLL.

Reviewed By: muiez, SeanP, ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D118503




More information about the All-commits mailing list