Skip to content

Commit b466404

Browse files
[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.
1 parent 114325b commit b466404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/bazel/llvm-project-overlay/llvm/config.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ llvm_config_defines = os_defines + select({
9494
"@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"),
9595
"@bazel_tools//src/conditions:linux_ppc64le": native_arch_defines("PowerPC", "powerpc64le-unknown-linux-gnu"),
9696
"@bazel_tools//src/conditions:linux_s390x": native_arch_defines("SystemZ", "systemz-unknown-linux_gnu"),
97-
"//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu"),
97+
"//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu") + ["HAVE_BUILTIN_THREAD_POINTER"],
9898
}) + [
9999
"LLVM_VERSION_MAJOR={}".format(LLVM_VERSION_MAJOR),
100100
"LLVM_VERSION_MINOR={}".format(LLVM_VERSION_MINOR),

0 commit comments

Comments
 (0)