[all-commits] [llvm/llvm-project] e911ec: [libcxx] Support LIBCXX_STATICALLY_LINK_ABI_IN_STA...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Sep 27 01:05:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e911ece557b7971dc5268ec3dca70540270c6a72
      https://github.com/llvm/llvm-project/commit/e911ece557b7971dc5268ec3dca70540270c6a72
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M libcxx/CMakeLists.txt

  Log Message:
  -----------
  [libcxx] Support LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY + LIBCXX_ENABLE_ABI_LINKER_SCRIPT

Currently if both LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY (only
applies to static library) and LIBCXX_ENABLE_ABI_LINKER_SCRIPT (only
applies to shared library) are enabled, the former will be silently
ignored. The shared library will use a linker script, while the
static library fails to link libc++abi.a entirely.

This is caused by what appears to be an implementation bug: The
LIBCXX_STATICALLY_LINK_ABI_IN_*_LIBRARY options are declared as
dependent options of LIBCXX_ENABLE_STATIC_ABI_LIBRARY, rather than
simply using it as the default value.

Of course, the combination of
LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY and
LIBCXX_ENABLE_ABI_LINKER_SCRIPT still results in a cmake error,
because these would be conflicting requests for the shared library.

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




More information about the All-commits mailing list