[clang] [llvm] [LLVM] Add GNU make jobserver support (PR #145131)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 15:28:11 PDT 2025
================
@@ -156,16 +226,22 @@ Executor *Executor::getDefaultExecutor() {
ThreadPoolExecutor::Deleter>
ManagedExec;
static std::unique_ptr<ThreadPoolExecutor> Exec(&(*ManagedExec));
- return Exec.get();
+ TheExec = Exec.get();
#else
// ManagedStatic is not desired on other platforms. When `Exec` is destroyed
// by llvm_shutdown(), worker threads will clean up and invoke TLS
// destructors. This can lead to race conditions if other threads attempt to
// access TLS objects that have already been destroyed.
static ThreadPoolExecutor Exec(strategy);
- return &Exec;
+ TheExec = &Exec;
#endif
}
+
+Executor *Executor::getDefaultExecutor() {
----------------
jyknight wrote:
Why is this function added? Initialization of a function-local "static" variable is already call-once, so this wrapper shouldn't be doing anything.
https://github.com/llvm/llvm-project/pull/145131
More information about the llvm-commits
mailing list