The intermediate PG instrument build now lands in Platform-pgi and the final optimized build in Platform-pgo.
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
-set folder=%platf%-pgo
-
+set PGI=%platf%-pgi
+set PGO=%platf%-pgo
@echo on
rem build the instrumented version
-call build -r -p %platf% -c PGInstrument
+call build -p %platf% -c PGInstrument
rem remove .pyc files, .pgc files and execute the job
-%folder%\python.exe rmpyc.py %clrpath%
-del %folder%\*.pgc
-%folder%\python.exe %job%
+%PGI%\python.exe rmpyc.py %clrpath%
+del %PGI%\*.pgc
+%PGI%\python.exe %job%
rem finally build the optimized version
-call build -r -p %platf% -c PGUpdate
+if exist %PGO% del /s /q %PGO%
+call build -p %platf% -c PGUpdate
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(bz2Dir)\$(PlatformName)-Release\libbz2.lib"
+ ImportLibrary="$(OutDirPGI)\$(TargetName).lib"
/>
<Tool
Name="VCALinkTool"
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(bz2Dir)\$(PlatformName)-Release\libbz2.lib"
+ ImportLibrary="$(OutDirPGI)\$(TargetName).lib"
TargetMachine="17"
/>
<Tool
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(bz2Dir)\$(PlatformName)-Release\libbz2.lib"
+ ImportLibrary="$(OutDirPGI)\$(TargetName).lib"
/>
<Tool
Name="VCALinkTool"
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(bz2Dir)\$(PlatformName)-Release\libbz2.lib"
+ ImportLibrary="$(OutDirPGI)\$(TargetName).lib"
TargetMachine="17"
/>
<Tool
</Configuration>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\pyproject.vsprops"
UseOfMFC="0"
ProjectType="Visual C++"
Version="8.00"
Name="pginstrument"
- OutputDirectory="$(SolutionDir)$(PlatformName)-pgo\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-pgo\$(ProjectName)\"
+ OutputDirectory="$(OutDirPGI)"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-pgi\$(ProjectName)\"
>
<Tool
Name="VCCLCompilerTool"
<Tool
Name="VCLinkerTool"
LinkTimeCodeGeneration="2"
+ ProfileGuidedDatabase="$(SolutionDir)$(PlatformName)-pgi\$(TargetName).pgd"
+ ImportLibrary="$(OutDirPGI)\$(TargetName).lib"
+ />
+ <UserMacro
+ Name="OutDirPGI"
+ Value="$(SolutionDir)$(PlatformName)-pgi\"
/>
</VisualStudioPropertySheet>
ProjectType="Visual C++"
Version="8.00"
Name="pgoptimize"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-pgo\"
InheritedPropertySheets="$(SolutionDir)\pginstrument.vsprops"
>
<Tool
Name="VCLinkerTool"
+ AdditionalManifestDependencies=""
LinkTimeCodeGeneration="4"
/>
</VisualStudioPropertySheet>
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
/>
<Tool
Name="VCALinkTool"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
TargetMachine="17"
/>
<Tool
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
/>
<Tool
Name="VCALinkTool"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
TargetMachine="17"
/>
<Tool
IgnoreDefaultLibraryNames="libc"
ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName).lib"
+ ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
/>
<Tool
Name="VCALinkTool"
IgnoreDefaultLibraryNames="libc"
ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName).lib"
+ ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
TargetMachine="17"
/>
<Tool
IgnoreDefaultLibraryNames="libc"
ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName).lib"
+ ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
/>
<Tool
Name="VCALinkTool"
IgnoreDefaultLibraryNames="libc"
ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName).lib"
+ ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
TargetMachine="17"
/>
<Tool
OutputFile="$(OutDir)\pythonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
TargetMachine="1"
/>
<Tool
OutputFile="$(OutDir)\pythonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
TargetMachine="17"
/>
<Tool
OutputFile="$(OutDir)\pythonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
TargetMachine="1"
/>
<Tool
OutputFile="$(OutDir)\pythonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
+ ImportLibrary=""
TargetMachine="17"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="false"
SubSystem="1"
+ ImportLibrary=""
/>
<Tool
Name="VCALinkTool"
Name="VCLinkerTool"
GenerateDebugInformation="false"
SubSystem="1"
+ ImportLibrary=""
TargetMachine="17"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="false"
SubSystem="1"
+ ImportLibrary=""
/>
<Tool
Name="VCALinkTool"
Name="VCLinkerTool"
GenerateDebugInformation="false"
SubSystem="1"
+ ImportLibrary=""
TargetMachine="17"
/>
<Tool