From 9d863b470fe8d87178abc693881dd183d2e6f142 Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Sat, 21 Feb 2026 13:05:23 +0700 Subject: [PATCH] chore: Configures mold linker for Linux Configures the mold linker for Linux targets, excluding MIPS architectures due to incompatibility. This improves linking speed. --- .cargo/config.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 1ef493c..73f33e3 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,4 @@ -[target.'cfg(target_os = "linux")'] -linker = "clang" +# Apply mold to all Linux targets EXCEPT MIPS +# MIPS is excluded because mold does not support it. +[target.'cfg(all(target_os = "linux", not(any(target_arch = "mips", target_arch = "mips64"))))'] rustflags = ["-C", "link-arg=-fuse-ld=mold"] \ No newline at end of file