[compiler-rt] [compiler-rt][builtins] Switch libatomic locks to pthread_mutex_t. (PR #94374)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 12:45:55 PDT 2024


mstorsjo wrote:

> > This also broke builds for Windows: https://github.com/mstorsjo/llvm-mingw/actions/runs/9376329007/job/25816083980
> > > Can you specialize this change to fall back to `_Atomic` when `COMPILER_RT_HAS_LIBPTHREAD` is off?
> > 
> > 
> > This sounds like a good idea, but I'd also like to make it dependent on platform. E.g. on Windows, libpthread may exist - there are third party libraries that provide the pthreads API, but we don't want to use it here even if it happens to exist while building compiler-rt.
> 
> Yeah, i agree that users should have a choice to opt-in to pthreads. As it seems like there are a few things to clarify, should this patch be reverted?

Yes, this should be reverted for now. I can push a revert shortly.

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


More information about the llvm-commits mailing list