summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2006-08-25 09:26:33 (GMT)
committerThomas Heller <theller@ctypes.org>2006-08-25 09:26:33 (GMT)
commit7dc77ce9694810cf448156420ac38e9ba252e88d (patch)
tree0312b998b3ab61bb7e0575af601e6c9b578ed3aa /PCbuild
parentb1a7d758e20025829aa27bf433dda7e8db15a9bc (diff)
downloadcpython-7dc77ce9694810cf448156420ac38e9ba252e88d.zip
cpython-7dc77ce9694810cf448156420ac38e9ba252e88d.tar.gz
cpython-7dc77ce9694810cf448156420ac38e9ba252e88d.tar.bz2
Build _ctypes.pyd for win AMD64 into the MSVC project file.
Since MSVC doesn't know about .asm files, a helper batch file is needed to find ml64.exe in predefined locations. The helper script hardcodes the path to the MS Platform SDK.
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/_ctypes.vcproj38
-rw-r--r--PCbuild/amd64_ml64.bat17
2 files changed, 54 insertions, 1 deletions
diff --git a/PCbuild/_ctypes.vcproj b/PCbuild/_ctypes.vcproj
index a77fdd4..748ee44 100644
--- a/PCbuild/_ctypes.vcproj
+++ b/PCbuild/_ctypes.vcproj
@@ -4,6 +4,7 @@
Version="7.10"
Name="_ctypes"
ProjectGUID="{F22F40F4-D318-40DC-96B3-88DC81CE0894}"
+ RootNamespace="_ctypes"
Keyword="Win32Proj">
<Platforms>
<Platform
@@ -128,7 +129,7 @@
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
- AdditionalOptions=" /USECL:MS_OPTERON"
+ AdditionalOptions=" /USECL:MS_OPTERON /GS-"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Include,..\PC,..\Modules\_ctypes\libffi_msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
@@ -268,6 +269,41 @@
</File>
<File
RelativePath="..\Modules\_ctypes\libffi_msvc\win32.c">
+ <FileConfiguration
+ Name="ReleaseAMD64|Win32"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Modules\_ctypes\libffi_msvc\win64.asm">
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseAMD64|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="amd64_ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;
+"
+ Outputs="&quot;$(IntDir)\win64.obj&quot;"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseItanium|Win32"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
</File>
</Files>
<Globals>
diff --git a/PCbuild/amd64_ml64.bat b/PCbuild/amd64_ml64.bat
new file mode 100644
index 0000000..fa9acf1
--- /dev/null
+++ b/PCbuild/amd64_ml64.bat
@@ -0,0 +1,17 @@
+@echo off
+rem Try to find the AMD64 assembler and call it with the supplied arguments.
+
+set MLEXE=Microsoft Platform SDK\Bin\Win64\x86\AMD64\ml64.EXE
+
+rem For the environment variables see also
+rem http://msdn.microsoft.com/library/en-us/win64/win64/wow64_implementation_details.asp
+
+if exist "%ProgramFiles%\%MLEXE%" (
+ set ML64="%ProgramFiles%\%MLEXE%"
+) else if exist "%ProgramW6432%\%MLEXE%" (
+ set ML64="%ProgramW6432%\%MLEXE%"
+) else (
+ set ML64=ml64.exe
+)
+
+%ML64% %*