Closed
Description
Among other possibilities, GNU's ld (ld.bfd) and ld.gold have an -O switch to perform various optimizations. It makes them spend more time optimizing lookup table performance/size. Rust has long mangled symbol names so these optimizations are going to be important once there are large projects with lots of symbols. We probably also want to use --as-needed
and perhaps --gc-sections
.
Sadly Apple's ld is pretty crippled and lacks the -O
switch, and I'm unsure about how portable these flags are overall. Although this issue would be bypassed by eventually using LLVM's lld
linker.