ports/devel/llvm-devel/files/patch-lld_ELF_Driver.cpp
Brooks Davis daa99286ef devel/llvm-devel: new snapshot, 32-bit improvements
Apply a patch based on one posted by Mark Millard in the comments of
https://reviews.freebsd.org/D46239 which defaults lld to using a single
thread on 32-bit systems.

Switch lua to 5.4, matching the intalled path of lldb.so.

Sponsored by: 	DARPA, AFRL
2024-11-14 22:35:53 +00: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);