Fix lld tests with LLVM_ENABLE_THREADS disabled.
With LLVM_ENABLE_THREADS disabled, all the llvm code assumes that it runs on a single thread and doesn't use any mutexes. lld still spawned lots of threads in that case and called into llvm, assuming that llvm is thread-safe. As fix, let lld use only a single thread if LLVM_ENABLE_THREADS is disabled. I left in all the mutexes in lld. That means lld is a bit slower than necessary in single-thread mode, but that's probably worth the simpler code. llvm-svn: 242004
Loading
Please sign in to comment