From 13894c034c11c76475d6f689e2d9e604e6edef66 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Tue, 12 Mar 2024 22:57:27 +0100 Subject: [PATCH] Add ccache and sccache support --- bin/install-software | 4 ++-- lone-files/bashrc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/install-software b/bin/install-software index d2785345..04f1be61 100755 --- a/bin/install-software +++ b/bin/install-software @@ -20,7 +20,7 @@ case "$ID" in else export "PARU_FLAGS=" fi - paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp-git tar zstd bzip zip unrar unzip 7-zip binutils ${PARU_FLAGS} + paru --removemake --batchinstall --sudoloop --mflags "--ignorearch" -Syu --needed bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp-git tar zstd bzip zip unrar unzip 7-zip ccache sccache binutils ${PARU_FLAGS} rustup default nightly rustup update cargo install eza @@ -35,7 +35,7 @@ case "$ID" in *) echo ":: No supported distribution found." echo " Install these packages manually:" - echo " bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp tar zstd gzip bzip zip unrar unzip 7z ['ar' or 'binutils']" + echo " bash ncurses nano rustup bat moar fireplace fortune-mod cowsay ytfzf yt-dlp tar zstd gzip bzip zip unrar unzip 7z ccache sccache ['ar' or 'binutils']" echo " Then do this:" echo " 1. Install the nightly rust toolchain and execute \"cargo install eza\"" echo " 2. Install sdkman by executing \"curl -s 'https://get.sdkman.io|bash'\"" diff --git a/lone-files/bashrc b/lone-files/bashrc index de0b609f..9b4500f2 100644 --- a/lone-files/bashrc +++ b/lone-files/bashrc @@ -6,6 +6,9 @@ source "/usr/share/icons-in-terminal/icons_bash.sh" source "${HOME}/.jstmbash/init.source" eval "$(starship init bash)" alias "fireplace=$(which fireplace) -f 60 -t 13" +export "RUSTC_WRAPPER=sccache" +export "RUSTFLAGS=\"-Z threads=$(nproc)\"" +export "CCACHE_DIR=/tmp/ccache" function cleanhome() { echo ":: Cleaning ~" rm -rf "${HOME}/.cache" "${HOME}/.dotnet" "${HOME}/.fltk" "${HOME}/.gradle" "${HOME}/.hyprland" "${HOME}/.java" "${HOME}/.npm" "${HOME}/.nuget" "${HOME}/.nvm" "${HOME}/.openjfx" "${HOME}/.pki" "${HOME}/.vnc" "${HOME}/.yarn" "${HOME}/go" "${HOME}/Android" "${HOME}/.android" "${HOME}/.lesshst" "${HOME}/.wget-hsts" "${HOME}/.yarnrc" "${HOME}/package-lock.json" "${HOME}/package.json" "${HOME}/node_modules" "${HOME}/.npmrc" "${HOME}/.gtkrc-2.0"