4 ms·
> You might wonder if we tried LTO with GCC, or tried upgrading to GCC 8.x. As a matter of fact, I did. Enabling LTO turned up linker errors So... they just ga
by ajross 8y ago
> You might wonder if we tried LTO with GCC, or tried upgrading to GCC 8.x. As a matter of fact, I did. Enabling LTO turned up linker errors
So... they just gave up on gcc, and then per the remainder of the blog post spent "3 months" fighting linker behavior to get LTO working on clang? That seems like a surprising asymmetry, and makes me wonder if the reported performance gains weren't the real reason for the switch.
- sciurus 8y agoThe primary change wasn't away from GCC, it was away from MSVC. https://groups.google.com/forum/m/#!topic/mozilla.dev.platform/wwO48xXFx0A https://groups.google.com/forum/m/#!topic/mozilla.dev.platfo...
- dralley 8y agoClang LTO works between Rust and C++ - GCC can't do that.
- steveklabnik 8y agowill work; it’s in-progress, but not ready for the big times yet, as far as I know https://github.com/rust-lang/rust/issues/49879 https://github.com/rust-lang/rust/issues/49879
- mgbmtl 8y agoThe blog post does also say: "Considering the expected future advantages from using clang (cross-language inlining with Rust, consistency between platforms), it seemed a better deal to switch to clang than to try to address those issues."
- cptskippy 8y ago> Considering the expected future advantages from using clang (cross-language inlining with Rust, consistency between platforms), it seemed a better deal to switch to clang than to try to address those issues. No, they anticipated switching over to clang in the future so rather than spend "3 months" fighting GCC's linker then do it all over again switching to clang, they just switched.
- topspin 8y ago> So... they just gave up on gcc, and then per the remainder of the blog post spent "3 months" fighting linker behavior to get LTO working on clang? Given that they're trying to align their C++ and Rust build tools -- the latter being based on LLVM -- the lack of interest in solving issues experienced with GCC is understandable. Also, given the complexity of the application and the platform diversity involved spending only "3 months" on such troubles is heroic performance.