[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 18:29:53 PST 2023


boomanaiden154 wrote:

> The CMake check was introduced in [822c31a](https://github.com/llvm/llvm-project/commit/822c31a0fe827a6f33601ad6b44eb2818350da36) and adjusted (`used`) in [a54545b](https://github.com/llvm/llvm-project/commit/a54545ba6514802178cf7cf1c1dd9f7efbf3cde7). Perhaps we can also disable Bazel builds if GCC<=10 or Clang<=13 at another layer? 

Didn't realize it was modified further after landing. Others would have to chime in on how to disable Bazel builds with old toolchains/whether or not that is even wanted.

>People who use this unofficial build system seem to use very new Clang or GCC. (Also we don't have build bots for older compilers, so they may not even work.)

I figured most people using Bazel would be using a recent toolchain, but wasn't entirely sure and would rather be a little bit more careful, especially as the exact toolchain requirements aren't documented anywhere, so this could theoretically cause breakage on platforms that weren't explicitly marked as unsupported.

> We probably don't even need to care about platforms where GCC doesn't define `__builtin_thread_pointer`: people don't use Bazel on these platforms.

If that's the case, then I can just add it to the Linux x86-64 defines in `./utils/bazel/llvm-project-overlay/llvm/config.bzl`. I guess gcc 10 is >3 years old at this point.

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


More information about the llvm-commits mailing list