[llvm] [Bazel] Define BUILTIN_THREAD_POINTER where appropriate on x86-64 linux (PR #74574)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 01:02:15 PST 2023
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/74574
This patch defines BUILTIN_THREAD_POINTER in config.h when appropriate (compiler must suppoert the option) on x86-64 linux only. This is needed to build exegesis properly as certain functionality breaks if this is not enabled.
>From b4bda0308f52a45485e8dff07cad31c6316b3992 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Wed, 6 Dec 2023 01:00:30 -0800
Subject: [PATCH] [Bazel] Define BUILTIN_THREAD_POINTER where appropriate on
x86-64 linux
This patch defines BUILTIN_THREAD_POINTER in config.h when appropriate
(compiler must suppoert the option) on x86-64 linux only. This is needed
to build exegesis properly as certain functionality breaks if this is
not enabled.
---
.../llvm-project-overlay/llvm/include/llvm/Config/config.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
index b4fb2373d571f..c861d1fadb3e0 100644
--- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
+++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
@@ -357,4 +357,10 @@
#define strdup _strdup
#endif
+#if defined(__linux__) && defined(__x86_64)
+#if __GNUC__ > 10 || __clang_major__ > 13
+#define HAVE_BUILTIN_THREAD_POINTER
+#endif
+#endif
+
#endif
More information about the llvm-commits
mailing list