opnsense-ports/devel/llvm-devel/files/patch-lld_ELF_Driver.cpp
Franco Fichtner 6d031d4c91 */*: sync with upstream
Taken from: FreeBSD
2024-11-19 10:01:34 +01:00

13 lines
631 B
C++

--- lld/ELF/Driver.cpp.orig
+++ lld/ELF/Driver.cpp
@@ -1723,6 +1723,10 @@
<< arg->getValue() << "'";
parallel::strategy = hardware_concurrency(threads);
ctx.arg.thinLTOJobs = v;
+ } else if (sizeof(size_t) < 8) {
+ // On 32-bit systems, cap the number of threads at 1.
+ Log(ctx) << "set maximum concurrency to 1, specify --threads= to change";
+ parallel::strategy = hardware_concurrency(1);
} else if (parallel::strategy.compute_thread_count() > 16) {
Log(ctx) << "set maximum concurrency to 16, specify --threads= to change";
parallel::strategy = hardware_concurrency(16);