I want to incorporate PGO into the Visual C++ build steps in an automated fashion.
Specifically, I wish to be able to:
Select a build configuration (let's call it
Release (PGO))Click Build Solution (or Build Project)
Simply wait for Visual Studio to:
a. Build an instrumented version of my project
b. Automatically invoke the executable with some command line (e.g.
--benchmark) and wait for it to exitc. Collected the instrumentation data from that execution
d. Build a profile-guided-optimized version of my project
Discover the PGO-optimized binary lying in my output directory
Is such a thing possible, and if so, how do I achieve it?
For your requirement, please check whether the target section is what you want:
MSBuild targets
And the time of the targets' trigger:
Target build order
You can put the automatic steps in a script, and use exec to run it:
Exec task
Such as: