diff --git a/.cargo/config.toml b/.cargo/config.toml index 678266e..db65bc6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,8 @@ -[build] -rustflags = ["-C", "link-arg=-fuse-ld=lld"] \ No newline at end of file +[target.x86_64-unknown-linux-gnu] +rustflags = ["-C", "link-arg=-fuse-ld=lld"] + +[target.i686-unknown-linux-gnu] +rustflags = ["-C", "link-arg=-fuse-ld=lld"] + +[target.aarch64-unknown-linux-gnu] +rustflags = ["-C", "link-arg=-fuse-ld=lld"] diff --git a/flake.nix b/flake.nix index c609842..18dd54f 100644 --- a/flake.nix +++ b/flake.nix @@ -26,15 +26,16 @@ in rec { devShell = with pkgs; mkShell { - nativeBuildInputs = [ - cmake - openssl - fontconfig - pkg-config - llvmPackages.lld - rust-analyzer - toolchain - ]; + nativeBuildInputs = + [ + cmake + openssl + fontconfig + pkg-config + rust-analyzer + toolchain + ] + ++ lib.optionals (with stdenv.hostPlatform; (isx86 || isi686 || isAarch64) && isLinux) [llvmPackages.lld]; }; formatter = pkgs.alejandra;