From a3d3844fc4ebb7d3c1742bb3e78bf3a3898a55d8 Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo@trentesaux.fr> Date: Thu, 6 Jul 2023 13:09:16 +0200 Subject: [PATCH] add mold to documentation --- docs/dev/setup.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/dev/setup.md b/docs/dev/setup.md index d7a6f3be2..ef3140d99 100644 --- a/docs/dev/setup.md +++ b/docs/dev/setup.md @@ -79,3 +79,16 @@ rustup update nightly rustup update stable rustup target add wasm32-unknown-unknown --toolchain nightly ``` + + +### Installing mold linker to decrease build time + +Mold (modern linker) (https://github.com/rui314/mold) decreases the build time. Install it through your system package for example then add the following to your `~/.cargo/config`: + +```toml +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"] +``` + +(see https://forum.duniter.org/t/decrease-duniter-build-time/10170 on the forum) \ No newline at end of file -- GitLab