]> granicus.if.org Git - python/commitdiff
Fixed PGO builds
authorChristian Heimes <christian@cheimes.de>
Thu, 22 Nov 2007 10:25:50 +0000 (10:25 +0000)
committerChristian Heimes <christian@cheimes.de>
Thu, 22 Nov 2007 10:25:50 +0000 (10:25 +0000)
The intermediate PG instrument build now lands in Platform-pgi and the final optimized build in Platform-pgo.

PCbuild9/build_pgo.bat
PCbuild9/bz2.vcproj
PCbuild9/make_versioninfo.vcproj
PCbuild9/pginstrument.vsprops
PCbuild9/pgupdate.vsprops
PCbuild9/python.vcproj
PCbuild9/pythoncore.vcproj
PCbuild9/pythonw.vcproj
PCbuild9/w9xpopen.vcproj

index 22de99753e6eb23e518ea669ad72da5db47a17c8..0c0a473b2c45ad7e873d96f6409942964eeba114 100644 (file)
@@ -23,18 +23,19 @@ set clrpath=%path1%
 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
 
index fc7d76f124a6465b25399dcde1ed04e4bb892771..3a15a81240ae772215bbad470f7773b65eaba519 100644 (file)
                        <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
index 5bbf21ef44fd58e5b9a398bacfcdcfcb1dff717b..61feabb880316c11cf227b5ec647b7d89e589665 100644 (file)
                </Configuration>
                <Configuration
                        Name="Debug|Win32"
-                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
                        InheritedPropertySheets=".\pyproject.vsprops"
                        UseOfMFC="0"
index e1211148ddbdf02e51d8209cbd21d9f990730045..1b08c5d5527b6b4634cdcd6028aa51c9101dfea2 100644 (file)
@@ -3,8 +3,8 @@
        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>
index 826242df6841cd8ab8559cd9bcfa03a9c54f1cf6..30ab891f223dcc8c49115bad90153378227f13fb 100644 (file)
@@ -3,10 +3,12 @@
        ProjectType="Visual C++"
        Version="8.00"
        Name="pgoptimize"
+       OutputDirectory="$(SolutionDir)$(PlatformName)-pgo\"
        InheritedPropertySheets="$(SolutionDir)\pginstrument.vsprops"
        >
        <Tool
                Name="VCLinkerTool"
+               AdditionalManifestDependencies=""
                LinkTimeCodeGeneration="4"
        />
 </VisualStudioPropertySheet>
index f362f05f03bf9084288fca56d8b205b95b786795..8381dcfe2e8c647e59886b7497a5d5220d53157e 100644 (file)
                                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
index a09c6246d1dc7ebee904e004cb4a8671a7eb6403..878d39128487c6ab5b53ce1db7e703419f2f51df 100644 (file)
                                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
index 4497ea63258ec5f7cc9a3754e0b62253165c104f..1bc1dad0ff747c2e96f18dd5f7874bb8dcb54d4c 100644 (file)
                                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
index 8d4dbe8a461a001c516f04390035989ba38511f4..d00cef4def8bd133b12e5122329214971cd6f814 100644 (file)
                                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