bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Improve `config_fast_builds.toml`

Open BD103 opened this issue 1 year ago • 4 comments

Objective

  • config_fast_builds.toml could use some general improvements and additions.
    • Mold is a modern linker with serious performance improvements that provides a good alternative to LLD.

Solution

  • Majorly improve config_fast_builds.toml.
    • Add further documentation.
    • Add a section for the alternative Mold / Sold linker, which is much faster.
    • Disable nightly options by default so that developers running stable can copy the file without having to edit it. (Nightly is still recommended, but this is following suite with rustfmt.toml.)

Changelog

  • Majorly improved config_fast_builds.toml documentation and added Mold / Sold linker.

BD103 avatar Apr 13 '24 03:04 BD103

Initial tests in CI appears to speed up the MacOS build times by ~2 minutes, but slows down Linux by ~45 seconds and Windows by ~2 minutes. I think this is due to apt-get update and cargo install -f cargo-binutils.

I'm going to look into downloading a prebuit cargo-binutils, and seeing if there is a better way to install LLD on Linux.

BD103 avatar Apr 15 '24 16:04 BD103

I'm going to split out the CI code into a separate PR so this can be merged.

BD103 avatar Apr 17 '24 11:04 BD103

sold is pretty much abandoned at this point, is it even worth it to mention it?

Actually, even llvm... apple released a new faster linker, which is why sold was abandoned

mockersf avatar Apr 18 '24 20:04 mockersf

sold is pretty much abandoned at this point, is it even worth it to mention it?

Actually, even llvm... apple released a new faster linker, which is why sold was abandoned

That's a good point. I think I'll remove references to Sold and add a comment to the MacOS tables saying that the builtin ld64 may provide better performance than LLD.

BD103 avatar Apr 19 '24 12:04 BD103