/OPT:REF
选项导致 Visual C++ 链接器
Exclude functions and/or data that are never referenced
( MSDN )
这似乎是在遗留代码库中识别过时代码的好方法。有没有办法让链接器输出消除的内容?
最佳答案
在 /OPT (Optimizations) ,备注部分指出:
You can use the /VERBOSE option to see the functions removed by /OPT:REF and the functions that are folded by /OPT:ICF.
我还没有尝试将它用于您的目的。
另外,您可能需要引用 SO Question 641826如果您采用@JamesMcNellis answer 给出的路线,则消除编译器生成的符号.
关于visual-c++ - 我可以看到 Visual C++/OPT :REF linker option? 消除了什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1509041/