[llvm] [bazel] Port #145358: LIBC_THREAD_MODE (PR #151539)
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 08:38:12 PDT 2025
rupprecht wrote:
> Hmm, it should default to `LIBC_THREAD_MODE_PLATFORM`...
AFAICT, the bazel config doesn't read those json files. What I'm suggesting is the header file itself could default, i.e. use this:
```c++
#if !defined(LIBC_THREAD_MODE)
#define LIBC_THREAD_MODE LIBC_THREAD_MODE_PLATFORM
#endif // LIBC_THREAD_MODE
```
Instead of https://github.com/llvm/llvm-project/blob/99d70e09a9676d63513a496f52acf93ca7167f00/libc/src/__support/threads/mutex.h#L24-L26
I don't have a preference though. Forcing the build system to define the vars is fine w/ me.
https://github.com/llvm/llvm-project/pull/151539
More information about the llvm-commits
mailing list