diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index 0b5e7d2ce..733426605 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -271,9 +271,13 @@ class CMakeBuilder(BuilderBase): "CMAKE_BUILD_TYPE": "RelWithDebInfo", } env = self._compute_env(install_dirs) - ccache = path_search(env, "ccache") - if ccache: - defines["CMAKE_CXX_COMPILER_LAUNCHER"] = ccache + if "SANDCASTLE" not in os.environ: + # We sometimes see intermittent ccache related breakages on some + # of the FB internal CI hosts, so we prefer to disable ccache + # when running in that environment. + ccache = path_search(env, "ccache") + if ccache: + defines["CMAKE_CXX_COMPILER_LAUNCHER"] = ccache if self.build_opts.is_darwin(): # Try to persuade cmake to set the rpath to match the lib # dirs of the dependencies. This isn't automatic, and to