================ @@ -45,8 +45,11 @@ void lld::unlinkAsync(StringRef path) { if (!sys::fs::exists(path) || !sys::fs::is_regular_file(path)) return; +// If threads are disabled, remove the file synchronously. ---------------- whitequark wrote:
I'm sorry, I don't quite understand. Are you asking me to change `ThreadPoolStrategy::ThreadsRequested` to be a constant? I could do that but it seems like an invasive change. Looking at other uses of `ThreadsRequested`, it looks like many of them are guarded in essentially the same way as what this patch introduces, e.g. here: https://github.com/llvm/llvm-project/blob/6441df3b5930ff9f8b3b9af6fd5d2684cf9a337b/llvm/lib/Support/Parallel.cpp#L196-L201 or here: https://github.com/llvm/llvm-project/blob/6441df3b5930ff9f8b3b9af6fd5d2684cf9a337b/llvm/lib/Support/Parallel.cpp#L227-L230 https://github.com/llvm/llvm-project/pull/92677 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits