前沿库和预编译头文件大小
Q1:我的 GCC 预编译头占用了 150 mb —— 是的,我正在使用来自 Boost 的不起眼的 TMP 库。有人有任何从这么大的 PCH 中受益的建议吗?我可以使用任何 makefile 片段来创建 ram-disk(tmpfs) 或其他东西(透明地/动态地)?
Q2:有什么方法可以守护 GCC 吗? ——毕竟,如果它保持活动状态,则不必每次都重新加载 PCH
Q3:(a) C++0x 是否会通过任何特定改进来减少此问题,以更好地表示 TMP 程序,(b) 或者也许CLANG会给编译过程带来改变?
ps,MSVCC 在这方面比 GCC 做得更好。
pss,我偷偷怀疑 GCC 没有接收我的 PCH。
Q1: My GCC precompiled header takes up 150 mb -- yes I'm using obscure TMP libraries from Boost. Anyone have any tips of benefiting from a PCH this large ? any makefile snippets which I could use to create a ram-disk(tmpfs) or something (transparently / on the fly) ?
Q2: Is there some way I could daemonize GCC ? -- after all if it stays active it doesn't have to reload the PCH everytime
Q3: (a) Will C++0x cut down on this issue by any specific improvements to enable better representions of TMP programs, (b) Or perhaps CLANG will bring about a change to the compilation process ?
p.s., MSVCC does a lot better of this then GCC.
p.s.s., I have a sneaking suspicion that GCC is not picking up my PCH.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于第一个问题,我认为操作系统缓存应该对你有帮助,否则你看不出如何改进它(正如 j_random_hacker 所说)。
关于第二季度,您想要的是 GCC 目前处于“项目”阶段,名称为 增量编译器。您可以询问 Tom Tromey(他的电子邮件位于链接页面上)当前状态如何。
Regarding Q1, I think OS cache should help you, don't see how you could improve it much otherwise (as j_random_hacker says).
Regarding Q2, what you want is currently in "project" stage for GCC, under the name of Incremental Compiler. You could ask Tom Tromey (his e-mail is on the linked page) what's the current status.