mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 09:16:05 +00:00

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