[all-commits] [llvm/llvm-project] be1b2a: [compiler-rt][CMake] Multiarch build of XRay libra...

Oleksii Lozovskyi via All-commits all-commits at lists.llvm.org
Thu Jun 22 18:41:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be1b2ac9485746a79b92310b9d0ba505650ce53e
      https://github.com/llvm/llvm-project/commit/be1b2ac9485746a79b92310b9d0ba505650ce53e
  Author: Oleksii Lozovskyi <me at ilammy.net>
  Date:   2023-06-22 (Thu, 22 Jun 2023)

  Changed paths:
    M compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    M compiler-rt/lib/xray/CMakeLists.txt

  Log Message:
  -----------
  [compiler-rt][CMake] Multiarch build of XRay libraries

Instead of dumping all sources into RTXray object library with a weird
special case for x86, handle multiarch builds better. Build a separate
object library for each arch with its arch-specific sources, then link
in all those libraries.

This fixes the build on platforms that produce fat binaries, such as new
macOS which expects both x86_64 and aarch64 objects in the same library
since Apple Silicon is a thing.

This only enables building XRay support for Apple Silicon. It does not
actually work yet on macOS, neither on Intel nor on Apple Silicon CPUs.
Thus the tests are still disabled.

Reviewed By: MaskRay, phosek

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




More information about the All-commits mailing list