Avoid LTO, and use lld to speed up the final link
This addresses a problem I noticed in the course of building a lightly-tweaked version of this package on Ubuntu 24.04/noble.
Specifically, the final link takes a LONG time. Here are the stats from a typical "before" build:
User time (seconds): 36917.33
System time (seconds): 6463.04
Percent of CPU this job got: 326%
Elapsed (wall clock) time (h:mm:ss or m:ss): 3:41:16
That's not even the full build time, because I am using ccache and this was not the first run---all C/C++ compiled objects are pulled from the cache. This is largely the time taken in running all the various Python/Node.js/etc. build scripts/tooling, building Rust objects, linking, and packaging.
I noticed during the build that it was GNU ld taking forever to run, so I tried re-running the build with lld, via the edit posted here. And goodness, what a difference:
User time (seconds): 8006.07
System time (seconds): 858.54
Percent of CPU this job got: 211%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:09:44
I dropped --reduce-memory-overheads as lld does not recognize that flag.