[all-commits] [llvm/llvm-project] 1adca7: Reapply "[XRay][AArch64] Support -fxray-shared (#1...

Sebastian Kreutzer via All-commits all-commits at lists.llvm.org
Thu Nov 7 23:21:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1adca7af21f1d8cc12b0f1c33db8ab869b36ae48
      https://github.com/llvm/llvm-project/commit/1adca7af21f1d8cc12b0f1c33db8ab869b36ae48
  Author: Sebastian Kreutzer <SebastianKreutzer at gmx.net>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M clang/lib/Driver/XRayArgs.cpp
    M clang/test/Driver/XRay/xray-shared.cpp
    M compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    M compiler-rt/lib/xray/CMakeLists.txt
    M compiler-rt/lib/xray/xray_trampoline_AArch64.S
    M compiler-rt/test/xray/TestCases/Posix/basic-mode-dso.cpp
    M compiler-rt/test/xray/TestCases/Posix/clang-xray-shared.cpp
    M compiler-rt/test/xray/TestCases/Posix/dlopen.cpp
    M compiler-rt/test/xray/TestCases/Posix/dso-dep-chains.cpp
    M compiler-rt/test/xray/TestCases/Posix/patch-premain-dso.cpp
    M compiler-rt/test/xray/TestCases/Posix/patching-unpatching-dso.cpp

  Log Message:
  -----------
  Reapply "[XRay][AArch64] Support -fxray-shared (#114431)" (#115300)

This patch implements support for `-fxray-shared` on AArch64 and fixes a
remaining issue in the previous PR #114431.

A bug in the XRay `CMakeLists.txt` caused the XRay assembly sources to
be built for every architecture in `XRAY_DSO_SUPPORTED_ARCH` on Apple.
This led to the compiler trying to compile AArch64 assembly for X86
targets and vice versa.
This is addressed here by ensuring that assembly sources are only built
for the matching architecture (see fixup commit).

**Original PR description:**
This patch adds support for `-fxray-shared` on AArch64. This feature,
introduced in #113548 for x86_64, enables the instrumentation of shared
libraries with XRay.

Changes:
- Adds AArch64 to the list of targets supporting `-fxray-shared`
- Introduces PIC versions of the AArch64 XRay trampolines 
- Adjusts relevant XRay tests



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