diff options
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index e850ed0d8a4..a07ac8c371e 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2235,8 +2235,8 @@ void MergeNoTailSection::finalizeContents() { // operations in the following tight loop. size_t Concurrency = 1; if (Config->Threads) - if (int N = std::thread::hardware_concurrency()) - Concurrency = std::min<size_t>(PowerOf2Floor(N), NumShards); + Concurrency = + std::min<size_t>(PowerOf2Floor(hardware_concurrency()), NumShards); // Add section pieces to the builders. parallelForEachN(0, Concurrency, [&](size_t ThreadId) { |