llvm.org GIT mirror llvm / 15f5deb
Fix llvm-dsymutil test in -DLLVM_ENABLE_THREADS=OFF mode After r316999, tools/dsymutil/X86/alias.test started failing in builds that have threading disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317263 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 1 year, 11 months ago
1 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
337337 NumThreads = 1;
338338 NumThreads = std::min(NumThreads, DebugMapPtrsOrErr->size());
339339
340 llvm::ThreadPool Threads(NumThreads);
341340
342341 // If there is more than one link to execute, we need to generate
343342 // temporary files.
365364 // FIXME: The DwarfLinker can have some very deep recursion that can max
366365 // out the (significantly smaller) stack when using threads. We don't
367366 // want this limitation when we only have a single thread.
368 if (NumThreads == 1)
367 if (NumThreads == 1) {
369368 LinkLambda();
370 else
369 } else {
370 llvm::ThreadPool Threads(NumThreads);
371371 Threads.async(LinkLambda);
372 Threads.wait();
373 }
372374
373375 if (NeedsTempFiles)
374376 TempFiles.emplace_back(Map->getTriple().getArchName().str(),
375377 OutputFile);
376378 }
377379
378 Threads.wait();
379380
380381 if (NeedsTempFiles &&
381382 !MachOUtils::generateUniversalBinary(