[clang] [lld] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 14 17:57:55 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list