[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
Fri Dec 8 13:07:50 PST 2023
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74574
>From b466404686d8e4c2bdbfc671428c2e39d96fa639 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.bzl when appropriate
on x86-64 linux only. This is needed to build exegesis properly as certain
functionality breaks if this is not enabled. This option is only
supported on relatively recent compiler versions, but given most people
using the bazel build are using very recent toolchains, this shouldn't
be an issue.
---
utils/bazel/llvm-project-overlay/llvm/config.bzl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl
index b15ec9e1bb399a..6cbe2b735d8c55 100644
--- a/utils/bazel/llvm-project-overlay/llvm/config.bzl
+++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl
@@ -94,7 +94,7 @@ llvm_config_defines = os_defines + select({
"@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"),
"@bazel_tools//src/conditions:linux_ppc64le": native_arch_defines("PowerPC", "powerpc64le-unknown-linux-gnu"),
"@bazel_tools//src/conditions:linux_s390x": native_arch_defines("SystemZ", "systemz-unknown-linux_gnu"),
- "//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu"),
+ "//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu") + ["HAVE_BUILTIN_THREAD_POINTER"],
}) + [
"LLVM_VERSION_MAJOR={}".format(LLVM_VERSION_MAJOR),
"LLVM_VERSION_MINOR={}".format(LLVM_VERSION_MINOR),
More information about the llvm-commits
mailing list