[all-commits] [llvm/llvm-project] 719b2a: [libc++] Allow testing Apple's system library as i...

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Jul 18 13:49:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 719b2ac42e42807c9282052718cbc91e0cac930c
      https://github.com/llvm/llvm-project/commit/719b2ac42e42807c9282052718cbc91e0cac930c
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M libcxx/cmake/caches/Apple.cmake
    A libcxx/test/configs/apple-libc++-shared.cfg.in
    M libcxx/utils/ci/apple-install-libcxx.sh
    A libcxxabi/src/vendor/apple/shims.cpp
    A libcxxabi/test/configs/apple-libc++abi-shared.cfg.in

  Log Message:
  -----------
  [libc++] Allow testing Apple's system library as it is installed (#99086)

In order to test libc++ under the "Apple System Library" configuration,
we need to run the tests using DYLD_LIBRARY_PATH. This is required
because libc++ gets an install_name of /usr/lib when built as a system
library, which means that we must override the copy of libc++ used by
the whole process. This effectively reverts 2cf2f1b, which was the wrong
solution for the problem I was having.

Of course, this assumes that the just-built libc++ is sufficient to
replace the system library, which is not actually the case
out-of-the-box. Indeed, the system library contains a few symbols that
are not provided by the upstream library, leading to undefined symbols
when replacing the system library by the just-built one.

To solve this problem, we separately build shims that provide those
missing symbols and we manually link against them when we build
executables in the tests. While this is somewhat brittle, it provides a
localized and unintrusive way to allow testing the Apple system
configuration in an upstream environment, which has been a frequent
request.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list