[llvm] [llvm-exegesis][AArch64] Adding PR_PAC_APIAKEY macro definition (PR #137888)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 15:25:57 PDT 2025


https://github.com/zeroomega created https://github.com/llvm/llvm-project/pull/137888

In older Linux distros, PR_PAC_APIAKEY is not defined and it causes build failures on linux arm64 platform. This patch adds the definition of this macro if it is not defined.

>From 39c2865fc97e04c8f61ebf8dca4d34d2ffef085d Mon Sep 17 00:00:00 2001
From: Haowei Wu <haowei at google.com>
Date: Tue, 29 Apr 2025 15:19:38 -0700
Subject: [PATCH] [llvm-exegesis][AArch64] Adding PR_PAC_APIAKEY macro
 definition

In older Linux distros, PR_PAC_APIAKEY is not defined and it causes
build failures on linux arm64 platform. This patch adds the definition
of this macro if it is not defined.
---
 llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp b/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
index 6d8e19e5820c7..aa34522cd7b7d 100644
--- a/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
@@ -18,6 +18,9 @@
 #ifndef PR_PAC_GET_ENABLED_KEYS
 #define PR_PAC_GET_ENABLED_KEYS 61
 #endif
+#ifndef PR_PAC_APIAKEY
+#define PR_PAC_APIAKEY			    (1UL << 0)
+#endif
 #endif
 
 #define GET_AVAILABLE_OPCODE_CHECKER



More information about the llvm-commits mailing list