4 ms·
Do you use mold as your linker? If not, can you try using it and let us know whether it improves your compile times or not? Here's the instructions for using
by stefanos82 4y ago
Do you use mold as your linker?
If not, can you try using it and let us know whether it improves your compile times or not?
Here's the instructions for using it with Rust: https://github.com/rui314/mold#how-to-use= https://github.com/rui314/mold#how-to-use=
- capableweb 4y agoSure thing. Compiled mold from source and got the following numbers when compiling Ditzes: - Debug build from scratch: ~1m 20s - Incremental debug build: ~3s - Release build from scratch: ~3m 40s So, seems that helped quite a bit, thanks for the tip :) As someone who is generally unaware of things as I'm new to Rust, is there any drawbacks to using a non-default linker? Everything seems to work fine as far as I can tell, but no drawbacks mentioned in the repository of Meld makes me slightly skeptical.
- nicoburns 4y agoThe drawbacks of mold are: - It's linux only (macOS support WIP) - It's still somewhat experimental. It may not be able to link everything. There may be bugs. Having said that, it's written by someone with a lot of experience writing linkers (they previously worked on lld), can link codebases as complex as chromium, and generally seems to work well for most use cases. A common pattern would be to use mold for development, and then the regular linker (varies by platform) for release builds.
- capableweb 4y ago> A common pattern would be to use mold for development, and then the regular linker (varies by platform) for release builds. That makes a lot of sense. Thanks for sharing the potential drawbacks and possible solutions to those :)