[PATCH] D41757: Add a config note and fix a config variable regarding CCACHE support.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 10:17:23 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323357: Fix up and document controlling ccache via CMake options. (authored by probinson, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41757?vs=128821&id=131307#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41757

Files:
  llvm/trunk/CMakeLists.txt
  llvm/trunk/docs/CMake.rst


Index: llvm/trunk/CMakeLists.txt
===================================================================
--- llvm/trunk/CMakeLists.txt
+++ llvm/trunk/CMakeLists.txt
@@ -137,11 +137,11 @@
 if(LLVM_CCACHE_BUILD)
   find_program(CCACHE_PROGRAM ccache)
   if(CCACHE_PROGRAM)
-      set(LLVM_CCACHE_SIZE "" CACHE STRING "Size of ccache")
+      set(LLVM_CCACHE_MAXSIZE "" CACHE STRING "Size of ccache")
       set(LLVM_CCACHE_DIR "" CACHE STRING "Directory to keep ccached data")
       set(CCACHE_PROGRAM "CCACHE_CPP2=yes CCACHE_HASHDIR=yes ${CCACHE_PROGRAM}")
-      if (LLVM_CCACHE_SIZE)
-        set(CCACHE_PROGRAM "CCACHE_SIZE=${LLVM_CCACHE_SIZE} ${CCACHE_PROGRAM}")
+      if (LLVM_CCACHE_MAXSIZE)
+        set(CCACHE_PROGRAM "CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${CCACHE_PROGRAM}")
       endif()
       if (LLVM_CCACHE_DIR)
         set(CCACHE_PROGRAM "CCACHE_DIR=${LLVM_CCACHE_DIR} ${CCACHE_PROGRAM}")
Index: llvm/trunk/docs/CMake.rst
===================================================================
--- llvm/trunk/docs/CMake.rst
+++ llvm/trunk/docs/CMake.rst
@@ -551,6 +551,14 @@
   <http://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`_ instrumentation
   is enabled while building llvm.
 
+**LLVM_CCACHE_BUILD**:BOOL
+  If enabled and the ``ccache`` program is available, then LLVM will be
+  built using ``ccache`` to speed up rebuilds of LLVM and its components.
+  Defaults to OFF.  The size and location of the cache maintained
+  by ``ccache`` can be adjusted via the LLVM_CCACHE_MAXSIZE and LLVM_CCACHE_DIR
+  options, which are passed to the CCACHE_MAXSIZE and CCACHE_DIR environment
+  variables, respectively.
+
 CMake Caches
 ============
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41757.131307.patch
Type: text/x-patch
Size: 1664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180124/0cadff20/attachment.bin>


More information about the llvm-commits mailing list