Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 2.2 KB

pgd-specify-database-for-profile-guided-optimizations.md

File metadata and controls

45 lines (28 loc) · 2.2 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: /PGD (Specify Database for Profile-Guided Optimizations)
/PGD (Specify Database for Profile-Guided Optimizations)
03/14/2018
VC.Project.VCLinkerTool.ProfileGuidedDatabase
-PGD linker option
/PGD linker option
9f312498-493b-461f-886f-92652257e443

/PGD (Specify Database for Profile-Guided Optimizations)

The /PGD option is deprecated. Starting in Visual Studio 2015, prefer the /GENPROFILE or /FASTGENPROFILE linker options instead. This option is used to specify the name of the .pgd file used by the profile-guided optimization process.

Syntax

/PGD:filename

Argument

filename
Specifies the name of the .pgd file that is used to hold information about the running program.

Remarks

When using the deprecated /LTCG:PGINSTRUMENT option, use /PGD to specify a nondefault name or location for the .pgd file. If you do not specify /PGD, the .pgd file base name is the same as the output file (.exe or .dll) base name and is created in the same directory from which the link was invoked.

When using the deprecated /LTCG:PGOPTIMIZE option, use the /PGD option to specify the name of the .pgd file to use to create the optimized image. The filename argument should match the filename specified to /LTCG:PGINSTRUMENT.

For more information, see Profile-Guided Optimizations.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > Linker > Optimization property page.

  3. Modify the Profile Guided Database property. Choose OK to save your changes.

To set this linker option programmatically

  1. See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.ProfileGuidedDatabase%2A.

See also

MSVC linker reference
MSVC Linker Options