mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Select correct tool platform when building on Windows ARM64 natively (GH-28491)
This commit is contained in:
parent
16b5bc6896
commit
adc5d32f47
2 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{CC9B93A2-439D-4058-9D29-6DCF43774405}</ProjectGuid>
|
<ProjectGuid>{CC9B93A2-439D-4058-9D29-6DCF43774405}</ProjectGuid>
|
||||||
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
|
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
|
||||||
|
@ -15,9 +18,7 @@
|
||||||
|
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<FreezeProjects>
|
<FreezeProjects>
|
||||||
<Platform>$(Platform)</Platform>
|
<Platform>$(PreferredToolArchitecture)</Platform>
|
||||||
<Platform Condition="$(Platform) == 'ARM'">Win32</Platform>
|
|
||||||
<Platform Condition="$(Platform) == 'ARM64'">x64</Platform>
|
|
||||||
<Configuration>$(Configuration)</Configuration>
|
<Configuration>$(Configuration)</Configuration>
|
||||||
<Configuration Condition="$(Configuration) == 'PGInstrument'">Release</Configuration>
|
<Configuration Condition="$(Configuration) == 'PGInstrument'">Release</Configuration>
|
||||||
<Properties></Properties>
|
<Properties></Properties>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import hashlib
|
||||||
import os
|
import os
|
||||||
import ntpath
|
import ntpath
|
||||||
import posixpath
|
import posixpath
|
||||||
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
@ -35,7 +36,10 @@ if sys.platform != "win32":
|
||||||
sys.exit("ERROR: missing _freeze_module")
|
sys.exit("ERROR: missing _freeze_module")
|
||||||
else:
|
else:
|
||||||
def find_tool():
|
def find_tool():
|
||||||
for arch in ['amd64', 'win32']:
|
archs = ['amd64', 'win32']
|
||||||
|
if platform.machine() == "ARM64":
|
||||||
|
archs.append('arm64')
|
||||||
|
for arch in archs:
|
||||||
for exe in ['_freeze_module.exe', '_freeze_module_d.exe']:
|
for exe in ['_freeze_module.exe', '_freeze_module_d.exe']:
|
||||||
tool = os.path.join(ROOT_DIR, 'PCbuild', arch, exe)
|
tool = os.path.join(ROOT_DIR, 'PCbuild', arch, exe)
|
||||||
if os.path.isfile(tool):
|
if os.path.isfile(tool):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue