[Bug 261977] lang/gcc12-devel: enable LTO
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 261977] lang/gcc12-devel: enable LTO"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Mar 2022 11:11:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261977 --- Comment #14 from Dimitry Andric <dim@FreeBSD.org> --- LTO is a trade-off, where you sacrifice more memory and CPU at link time for possibly faster and/or smaller final binaries. That it eats more resources is almost guaranteed, but slightly "better" binaries may not be worth the cost... (Side note: one annoying aspect is that because it can be so time consuming, these heavy link jobs tend to cluster up, if you do a multi-jobbed build, either via poudriere or some other build system. Which then means that you have a bunch of huge linking processes running in parallel, eating up even more resources!) That said, I would say the safe, conservative choice is to make use of LTO an opt-in (either global, or per port), instead of an opt-out? I mean, if you have a huge machine with plenty of CPU and RAM, then by all means LTO the hell out of everything, but most people aren't that lucky (or rich). :-) -- You are receiving this mail because: You are on the CC list for the bug.