如何防止Xcode 4.2填充我的启动驱动器与preamble.pch文件? [英] How can I prevent Xcode 4.2 from filling my boot drive with preamble.pch files?

查看:609
本文介绍了如何防止Xcode 4.2填充我的启动驱动器与preamble.pch文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 4.2中有一个问题,其中Xcode将填充我的启动驱动器几十GB的 preamble.pch - ****** 文件, code> / private / var / folders / 。

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/.

有人知道如何防止这种情况吗? strong>

Does anybody know how to prevent this from happening?

这意味着我必须每隔几个小时手动清空这些文件(如果必要,退出/重新启动Xcode),以防止启动驱动器充满。

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.

其他:


  • 我的构建不使用预编译头(看起来这些是由Xcode的文本编辑器生成的,使用Clang的代码感知索引)。

  • 几十GB是我的启动分区很多;我使用了几个小分区。

感谢

推荐答案

我不是clang专家,但快速浏览lib / Frontend / ASUnit.cpp揭示了GetPreamblePCHPath()将使用三个环境变量的值 - 按顺序: TMPDIR TEMP TMP - 默认为/ tmp作为前导PCH文件的位置。一个(不是真正理想的)解决方案是将这些变量之一设置到另一个卷中的目录。

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 and TMP — 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.

这篇关于如何防止Xcode 4.2填充我的启动驱动器与preamble.pch文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆