This extension contains various components of the Rust stable toolchain.
In order to use the (fast) mold linker:
- Add
org.freedesktop.Sdk.Extension.llvm13
along with this extension in order to get clang. - Add
/usr/lib/sdk/llvm13/bin
toappend-path
. See llvm13 SDK extension readme for more information. - Add
.cargo/config.toml
in the root of the repository with the following content:
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/usr/lib/sdk/rust-stable/bin/mold"]
Note: llvm13 is needed until there is a release of gcc12.1. As soon as gcc12.1 is in the freedesktop sdk, gcc can be used instead of clang.
In order to use this extension in flatpak SDK environment you may add all provided tools in your PATH by executing first:
source /usr/lib/sdk/rust-stable/enable.sh