Skip to content

Instantly share code, notes, and snippets.

@arsham
Last active July 25, 2024 17:48
Show Gist options
  • Save arsham/d6d01e94b2ffe19d101123236677256d to your computer and use it in GitHub Desktop.
Save arsham/d6d01e94b2ffe19d101123236677256d to your computer and use it in GitHub Desktop.
#ccache tips for better compilations performance. #linux

Ccache

Setup

Install ccache then update the PATH:

export PATH="/usr/lib/ccache:$PATH"

Add to ~/.ccache/ccache.conf

max_size = 5.0G
hash_dir = false

Tools

Statistics:

$ ccache -s

To clear the cache:

$ ccache -C

To reset the statistics:

$ ccache -z

Gold Linker

replace /usr/bin/ld with /usr/bin/ld.gold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment