use gold instead of bfd on Linux if it's available

3146887
Opened by Daniel Micay at 2016-07-14 22:13:28

This is what clang does on Linux, by detecting the existence of /usr/bin/ld.gold and then using it. This can be done with gcc by passing -fuse-ld=gold. It's a much faster linker and doesn't consume as much memory, so it will reduce the compiler's peak memory consumption.

  1. Mind if I take a look at this one?

    smaudet at 2015-01-08 10:36:23

  2. FWIW I did an experiment today and servo in debug mode builds in 54 seconds with ld and 14 seconds with gold. I'm going to see if I can get a patch together for this.

    Brian Anderson at 2015-08-07 21:44:25

  3. Closing in favor of https://github.com/rust-lang/rust/issues/30783

    bstrie at 2016-07-14 22:13:28