Commits

Jeremy Kloth  committed 5924b37 Draft

Fix 64-bit builds using the buildbot scripts

  • Participants
  • Parent commits 1997633

Comments (0)

Files changed (11)

File PC/pylauncher.rc

 #define MS_WINDOWS
 #include "..\Include\modsupport.h"
 #include "..\Include\patchlevel.h"
-#ifdef _DEBUG
-#   include "pythonnt_rc_d.h"
-#else
-#   include "pythonnt_rc.h"
-#endif
+#include "pythonnt_rc.h"
 
 #define PYTHON_VERSION PY_VERSION "\0"
 #define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION

File PC/python_nt.rc

 #define MS_WINDOWS
 #include "modsupport.h"
 #include "patchlevel.h"
-#ifdef _DEBUG
-#   include "pythonnt_rc_d.h"
-#else
-#   include "pythonnt_rc.h"
-#endif
+#include "pythonnt_rc.h"
 
 /* e.g., 3.3.0a1
  * PY_VERSION comes from patchevel.h

File PCbuild/make_versioninfo.vcxproj

 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{F0E0541E-F17D-430B-97C4-93ADF0DD284E}</ProjectGuid>
     <RootNamespace>make_versioninfo</RootNamespace>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseOfMfc>false</UseOfMfc>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-  </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="pyproject.props" />
-    <Import Project="debug.props" />
-  </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     <Import Project="pyproject.props" />
     <Import Project="release.props" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="pyproject.props" />
-    <Import Project="x64.props" />
-    <Import Project="debug.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="pyproject.props" />
-    <Import Project="x64.props" />
-    <Import Project="release.props" />
-  </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup>
     <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
     <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
     <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <CustomBuildStep>
 </Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <CustomBuildStep>
-      <Message>Build PC/pythonnt_rc(_d).h</Message>
-      <Command>cd $(SolutionDir)
-make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h
-</Command>
-      <Outputs>$(SolutionDir)..\PC\pythonnt_rc.h;%(Outputs)</Outputs>
-    </CustomBuildStep>
-    <ClCompile>
-      <Optimization>MaxSpeed</Optimization>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(SolutionDir)make_versioninfo.exe</OutputFile>
-    </Link>
-    <PostBuildEvent>
-      <Command>cd $(SolutionDir)
-make_versioninfo.exe &gt; ..\PC\python_nt.h
-</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <CustomBuildStep>
-      <Message>Build PC/pythonnt_rc(_d).h</Message>
-      <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\pythonnt_rc_d.h
-</Command>
-      <Outputs>$(SolutionDir)..\PC\pythonnt_rc_d.h;%(Outputs)</Outputs>
-    </CustomBuildStep>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <IntrinsicFunctions>false</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>true</StringPooling>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <CompileAs>Default</CompileAs>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(SolutionDir)make_versioninfo_d.exe</OutputFile>
-      <SubSystem>Console</SubSystem>
-      <BaseAddress>0x1d000000</BaseAddress>
-    </Link>
-    <PostBuildEvent>
-      <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\python_nt_d.h
-</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <CustomBuildStep>
-      <Message>Build PC/pythonnt_rc(_d).h</Message>
-      <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\pythonnt_rc_d.h
-</Command>
-      <Outputs>$(SolutionDir)..\PC\pythonnt_rc_d.h;%(Outputs)</Outputs>
-    </CustomBuildStep>
-    <Midl>
-      <TargetEnvironment>X64</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <IntrinsicFunctions>false</IntrinsicFunctions>
-      <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <OutputFile>$(SolutionDir)make_versioninfo_d.exe</OutputFile>
-      <TargetMachine>MachineX64</TargetMachine>
-    </Link>
-    <PostBuildEvent>
-      <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\python_nt_d.h
-</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="..\PC\make_versioninfo.c" />
   </ItemGroup>

File PCbuild/pcbuild.sln

 		{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32
 		{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64
 		{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64
-		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32
-		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32
-		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32
+		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Release|Win32
+		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Release|Win32
+		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Release|Win32
+		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Release|Win32
 		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32
 		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32
 		{F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32

File PCbuild/x64.props

 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Label="UserMacros">
-    <PythonExe>$(HOST_PYTHON)</PythonExe>
-  </PropertyGroup>
   <PropertyGroup>
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
     <_PropertySheetDisplayName>amd64</_PropertySheetDisplayName>
     <OutDir>$(SolutionDir)amd64\</OutDir>
     <IntDir>$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir>
   </PropertyGroup>
+  <PropertyGroup Label="UserMacros">
+    <PythonExe>$(OutDir)python$(PyDebugExt).exe</PythonExe>
+  </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
       <AdditionalOptions>/USECL:MS_OPTERON /GS- %(AdditionalOptions)</AdditionalOptions>
       <TargetMachine>MachineX64</TargetMachine>
     </Link>
   </ItemDefinitionGroup>
-  <ItemGroup>
-    <BuildMacro Include="PythonExe">
-      <Value>$(PythonExe)</Value>
-    </BuildMacro>
-  </ItemGroup>
 </Project>

File Tools/buildbot/build-amd64.bat

 @rem Used by the buildbot "compile" step.
 cmd /c Tools\buildbot\external-amd64.bat
-call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
 cmd /c Tools\buildbot\clean-amd64.bat
+call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
 msbuild /p:useenv=true PCbuild\kill_python.vcxproj /p:Configuration=Debug /p:PlatformTarget=x64
 PCbuild\amd64\kill_python_d.exe
+cmd /c Tools\buildbot\build-common.bat
 msbuild /p:useenv=true PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64

File Tools/buildbot/build-common.bat

+@rem Common file shared between build.bat and build-amd64.bat.
+@rem Builds the helper executables as Win32-only binaries (http://bugs.python.org/issue9981)
+call "%VS100COMNTOOLS%vsvars32.bat"
+msbuild /p:useenv=true PCbuild\make_buildinfo.vcxproj /p:Configuration=Release /p:Platform=Win32
+msbuild /p:useenv=true PCbuild\make_versioninfo.vcxproj /p:Configuration=Release /p:Platform=Win32

File Tools/buildbot/build.bat

 @rem Used by the buildbot "compile" step.
 cmd /c Tools\buildbot\external.bat
+cmd /c Tools\buildbot\clean.bat
 call "%VS100COMNTOOLS%vsvars32.bat"
-cmd /c Tools\buildbot\clean.bat
 msbuild /p:useenv=true PCbuild\kill_python.vcxproj /p:Configuration=Debug /p:PlatformTarget=x86
 PCbuild\kill_python_d.exe
+cmd /c Tools\buildbot\build-common.bat
 msbuild /p:useenv=true PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
 

File Tools/buildbot/clean-amd64.bat

 @rem Used by the buildbot "clean" step.
-call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
-@echo Deleting .pyc/.pyo files ...
-del /s Lib\*.pyc Lib\*.pyo
-@echo Deleting test leftovers ...
-rmdir /s /q build
-cd PCbuild
-msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
-msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
-cd ..
+call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
+call "Tools\buildbot\clean-common.bat" x64

File Tools/buildbot/clean-common.bat

+@rem Common file shared between clean.bat and clean-amd64.bat.
+
+@echo Deleting test leftovers ...
+if exist build (
+    rmdir /s /q build
+)
+cd PCbuild
+msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=%1
+msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=%1
+cd ..

File Tools/buildbot/clean.bat

 @rem Used by the buildbot "clean" step.
 call "%VS100COMNTOOLS%vsvars32.bat"
-@echo Deleting test leftovers ...
-rmdir /s /q build
-cd PCbuild
-msbuild /target:clean pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x86
-msbuild /target:clean pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x86
-cd ..
+call "Tools\buildbot\clean-common.bat" x86