Project

General

Profile

Feature #2592

Allow compile caching with ccache

Added by Eric Irrgang 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
build system
Target version:
-
Difficulty:
uncategorized
Close

Description

ccache is a compiler wrapper that can greatly speed up rebuilds in some cases. To be used with CMake in a general way, the LAUNCHER facility can be used. A proposed CMake update is in Change-Id: Ia04d7388a3e8367d31cc5728dfc4b245ea7ef774

Associated revisions

Revision 04190c78 (diff)
Added by Eric Irrgang 3 months ago

Enable ccache compiler wrapper when available.

Let CMake use ccache compiler wrapper via `..._LAUNCHER`.

For gcc and compatible compilers, the cost of rebuilding can be greatly
reduced when switching back and forth between branches. If ccache is not
installed or is not given a known-compatible compiler to wrap, this
change has no effect.

Potential side effects should already be familiar to ccache users:

  • In some cases, a cache configured to grow too large may lose its benefit.
  • If the cache is corrupted, it may need to be removed to restore utility.

We are not using any of the more aggressive caching options, so there
should be no risk of false positives in compile cache hits.

Resolves #2592

Change-Id: Ia04d7388a3e8367d31cc5728dfc4b245ea7ef774

History

#1 Updated by Gerrit Code Review Bot 4 months ago

Gerrit received a related patchset '3' for Issue #2592.
Uploader: M. Eric Irrgang ()
Change-Id: gromacs~master~Ia04d7388a3e8367d31cc5728dfc4b245ea7ef774
Gerrit URL: https://gerrit.gromacs.org/8117

#2 Updated by Eric Irrgang 4 months ago

  • Description updated (diff)

I believe suggestions from code review have been addressed as of patch set 4 on Gerrit. The feature will be quietly on by default, but easily disabled. Output is minimal and idempotent. Conditional activation is conservative, but a note in the developer tools notes suggests adventurous users try out and submit updates when the caching should be applied more aggressively.

#3 Updated by Eric Irrgang 3 months ago

  • Status changed from New to Resolved

#4 Updated by Paul Bauer 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF