Edit

Share via


/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 ProfileGuidedDatabase.

See also

MSVC linker reference
MSVC Linker Options