[all-commits] [llvm/llvm-project] 3789c2: [libcxxabi] Automatically use static libunwind whe...

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Mon Aug 28 17:35:43 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3789c236bbda9dda6e927cb0fff9da67f1eebc70
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M libcxxabi/src/CMakeLists.txt

  Log Message:
  [libcxxabi] Automatically use static libunwind when required

If we attempt to use unwind_shared when LIBUNWIND_ENABLE_SHARED is OFF,
avoids that, but it seems redundant to have to specify it manually.
Automatically switch libunwind statically when its shared build is
disabled, which also matches compiler-rt [1].

[1] https://github.com/llvm/llvm-project/blob/71bfec762bd970e7834f58c158ddc15f93402d7a/compiler-rt/CMakeLists.txt#L238-L240

Reviewed By: #libc_abi, phosek

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

  Commit: cf403c10fba72ddc6a083a0e1603974d0749c6b3
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M compiler-rt/CMakeLists.txt

  Log Message:
  [compiler-rt] Improve defaults for Android

Android has only used libc++ for a long time, and since NDK r23, it
also always uses compiler-rt and LLVM's libunwind (which is linked
statically). Reflect these defaults in compiler-rt's build, instead of
requiring the correct settings to always be externally specified.

Reviewed By: srhines

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

  Commit: dcafbd0c673eb7513f2bf7b05e758c58de022af4
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M compiler-rt/lib/asan/tests/CMakeLists.txt
    M compiler-rt/lib/interception/tests/CMakeLists.txt
    M compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt

  Log Message:
  [compiler-rt] Remove explicit Android libatomic linking

The comments date back to NDK r10, which is ancient. libatomic isn't
always needed anymore, and even when it is, it's bundled into
compiler-rt in the NDK so we'll get it automatically. Remove the
unnecessary explicit links.

Reviewed By: srhines

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

  Commit: b6a1473f97d38471b08331dee7ae7f6112c495c0
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang/include/clang/Driver/ToolChain.h
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Driver/ToolChain.cpp

  Log Message:
  [driver] Refactor getRuntimePaths. NFC

This used to be getRuntimePath till https://reviews.llvm.org/D115049
added a fallback search path for Android. As far as I can tell, the
intent has always been to use the first existing path though instead of
actually supporting multiple runtime paths. We can move the existence
checks into getRuntimePath and have it return std::optional, which also
makes the `--print-runtime-dir` behavior much cleaner.

The motivation is a follow-up change to Android runtime path searches,
which is much nicer with this in place.

Reviewed By: phosek, MaskRay

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

Compare: https://github.com/llvm/llvm-project/compare/2e53e1548074...b6a1473f97d3

More information about the All-commits mailing list