News for hackers. Stuff that matters.
Re:Swift architecture at Uber by klodolph on Thursday April 27, 2017 @01:01AM (#14209292)
That's not actually true. You have to pass special linker flags to tell the linker to avoid including code which isn't used. With GNU Binutils and GCC, those flags are -Wl,--as-needed and -Wl,--gc-sections. Normally, unused code is only excluded if it is part of a static library. Even then it is only excluded or included an entire file at a time, unless you split files into multiple sections with the compiler (which has drawbacks—the compiler can do certain optimizations if it knows that two pieces of code or some code and data end up in the same section).
Re:Swift architecture at Uber by kornish on Thursday April 27, 2017 @04:21PM (#14214363)
Ah, good to know – thanks for correcting.