While incremental linking addresses much of the time spent linking, even for very large projects, I find the incremental linker in MSVS to be pretty haphazard. (I'm currently using 2003 atm, would love to hear if 2005/8 addressed any of this.) My list of known triggers include:
虽然增量链接解决了链接所花费的大部分时间,即使对于非常大的项目,我发现MSVS中的增量链接器非常偶然。 (我目前正在使用2003 atm,很想听听2005/8是否解决了这个问题。)我的已知触发器列表包括:
- changing anything external to the main .exe project will trigger a full link
- adding static variables had a 50% chance of triggering a full link
更改主.exe项目外部的任何内容都将触发完整链接
添加静态变量有50%的几率触发完整链接
and this list is certainly not inclusive. What can I do to avoid full links?
这个清单肯定不具有包容性。我该怎么做才能避免完整链接?
So far, the only diagnosis tool i've found so far is
到目前为止,我到目前为止找到的唯一诊断工具是
- /test in the linker command line options
/在链接器命令行选项中测试
and it's terrible. What solutions are out there for diagnosing triggers for full re-links?
这太糟糕了有哪些解决方案可用于诊断完全重新链接的触发器?
2 个解决方案
#1
1
Minimizing the number of projects in your solution makes the problem a little better. And of course all the normal build speed-ups will work, like reducing includes and shrinking obj files size.
最大限度地减少解决方案中的项目数量可以使问题更好一些。当然,所有正常的构建加速都可以工作,比如减少包含和缩小obj文件的大小。
#2
0
I'm using 2008; and while I have only used it for small->medium sized projects, so far I haven't experienced any unexpected full links.
我正在使用2008;虽然我只将它用于小型或中型项目,但到目前为止我还没有遇到任何意外的完整链接。
I haven't used 03, but in my opinion 08 seems to be far better then 05.
我没有使用03,但在我看来08似乎比05好得多。
#1
1
Minimizing the number of projects in your solution makes the problem a little better. And of course all the normal build speed-ups will work, like reducing includes and shrinking obj files size.
最大限度地减少解决方案中的项目数量可以使问题更好一些。当然,所有正常的构建加速都可以工作,比如减少包含和缩小obj文件的大小。
#2
0
I'm using 2008; and while I have only used it for small->medium sized projects, so far I haven't experienced any unexpected full links.
我正在使用2008;虽然我只将它用于小型或中型项目,但到目前为止我还没有遇到任何意外的完整链接。
I haven't used 03, but in my opinion 08 seems to be far better then 05.
我没有使用03,但在我看来08似乎比05好得多。