当我仅使用链接器选项 /LTCG时,为什么Visual Studio在Linker命令行中显示选项 /PGD
Why does Visual Studio show the option /PGD in the linker command line when I use just the linker option /LTCG?
如果仅在Release
模式下构建一个项目,该模式仅包含带有int main() {}
的.cpp
文件,则在Configuration Properties > Linker > Command Line
中看到选项/PGD:"C:Users*****DocumentsVisual StudioProjectssolution nameReleaseproject name.pgd"
,就好像链接器应该为配置文件创建数据库 - 对该项目的指导优化。
但显然是不是,因为链接器在发行版构建中使用的/LTCG
选项仅为/LTCG
,而不是/LTCG:PGINSTRUMENT
。为了证实这一点,可以检查上述Release
目录中没有任何.pgd
文件。
为什么Visual Studio在项目的命令行中有此选项(/PGD)?
P.S。我正在使用VS2017进行此模拟,但我相信在Visual Studio的先前版本中,结果应该相同。
每个Visual Studio项目默认设置了/PGD
选项,默认路径为$(OutDir)$(TargetName).pgd
。除非您使用/LTCG:PG*
选项明确启用PGO,否则此设置无效。
相关文章:
- Visual Studio C++ 它只构建选项卡中显示的文件吗?
- Visual Studio 2017扩展选项卡中的C++核心指导原则检查器丢失
- 当 /Whorearchive选项处于活动状态时,无法使用Visual Studio链接到Windows上的自构建张量
- Visual Studio警告D9025看似兼容的选项
- 用于在 Visual Studio 中为整个项目或解决方案定义带有参数的预处理器宏的选项
- 如何在Visual Studio中访问保存-Temps选项
- Visual Studio中的GS选项
- Visual Studio源文件目录更改选项在哪里
- Visual Studio 2015 中缺少"General"选项卡
- 当我仅使用链接器选项 /LTCG时,为什么Visual Studio在Linker命令行中显示选项 /PGD
- Visual Studio 2008 没有出现 X64 选项 win 7 64 位
- 更改Visual Studio中类的默认选项卡结构
- 如何使用CMake为visual studio 2010设置图书管理员选项/忽略:4221
- 为什么Visual Studio 2012的选项 - Visual Studios中缺少Windows XP(v110_
- Visual Studio 中编译选项 /DPROFILE 和 /UPROFILE 的含义是什么Microsoft?
- Visual Studio C++编译器选项:为什么 /O2 定义 /Gs
- Visual Studio 2012 for windows 8未显示win32控制台应用程序选项
- Visual Studio 2012:错误LNK1117:选项 'MAPINFO:LINES' 中的语法错误
- Android Studio -没有链接c++到Gradle的选项
- Visual Studio中不同编译选项的不同源文件