There's an issue in Xcode 4.2, where Xcode will fill my boot drive with tens of GB of preamble.pch-******
files, someplace within /private/var/folders/
.
Does anybody know how to prevent this from happening?
This means I have to manually empty these files every few hours (quitting/restarting Xcode if necessary), to prevent my boot drive from filling up. I'd (likely) rather revert to the old behavior than create some script or program to systematically remove these every hour, if possible.
Misc:
- My builds do not use precompiled headers (it looks like these are being generated by Xcode's text editors, using Clang's code sense indexing).
- Tens of GB is a lot for my boot partitions; I use several small partitions.
Thanks
Iām no clang expert, but a quick glance at lib/Frontend/ASUnit.cpp reveals that GetPreamblePCHPath() will use the value of three environment variables ā in order:
TMPDIR
,TEMP
andTMP
ā before defaulting to /tmp as the location of preamble PCH files. One (not really ideal) solution is to set one of those variables to a directory residing in another volume.