Skip to content

Commit f75292a

Browse files
committed
Elaborate the comment, include flag in docs
1 parent 31b413d commit f75292a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

llvm/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ if(LLVM_CCACHE_BUILD)
289289
set(LLVM_CCACHE_PARAMS "CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros"
290290
CACHE STRING "Parameters to pass through to ccache")
291291

292-
# Using precompiled headers with ccache builds can result in intermittent CI failures
292+
# FIXME: This is a workaround for an unknown underlying issue where the header file
293+
# changes but then the pch does not get rebuilt before its dependencies.
294+
# See: https://github.com/llvm/llvm-project/issues/142449
293295
set(LLVM_CCACHE_PCH OFF CACHE BOOL "Use precompiled headers in ccache builds")
294296
if (NOT LLVM_CCACHE_PCH)
295297
set(CMAKE_DISABLE_PRECOMPILE_HEADERS "ON")

llvm/docs/CMake.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,9 @@ enabled sub-projects. Nearly all of these variable names begin with
412412
Defaults to OFF. The size and location of the cache maintained
413413
by ``ccache`` can be adjusted via the LLVM_CCACHE_MAXSIZE and LLVM_CCACHE_DIR
414414
options, which are passed to the CCACHE_MAXSIZE and CCACHE_DIR environment
415-
variables, respectively.
415+
variables, respectively. By default, enabling the ccache build will disable
416+
using precompiled headers as they have been known to cause intermittent CI
417+
failures. This can be adjusted via the LLVM_CCACHE_PCH option.
416418

417419
**LLVM_CODE_COVERAGE_TARGETS**:STRING
418420
If set to a semicolon separated list of targets, those targets will be used

0 commit comments

Comments
 (0)