[llvm] [Bazel] Define BUILTIN_THREAD_POINTER where appropriate on x86-64 linux (PR #74574)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 09:50:51 PST 2023


rnk wrote:

I think this should be done in the style of the checks in [Compiler.h](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h), somehow like this:
```
#if __has_builtin(__builtin_thread_pointer) || LLVM_GNUC_PREREQ(10, 0, 0)
# define HAVE_BUILTIN_THREAD_POINTER
#endif
```

And then secondarily, since exegesis is the only client of the define, I would actually sync it down to the one .cpp file that uses this check. We shouldn't inflict an entire configuration test compilation the entire project because one single non-essential benchmark library needs this, when a compiler version check will suffice.

https://github.com/llvm/llvm-project/pull/74574


More information about the llvm-commits mailing list