5454PLAT_TO_VCVARS = {
5555 'win32' : 'x86' ,
5656 'win-amd64' : 'amd64' ,
57- 'win-arm64' : 'arm64' ,
5857}
5958
6059class Reg :
@@ -343,7 +342,7 @@ def initialize(self, plat_name=None):
343342 if plat_name is None :
344343 plat_name = get_platform ()
345344 # sanity check for platforms to prevent obscure errors later.
346- ok_plats = 'win32' , 'win-amd64' , 'win-arm64'
345+ ok_plats = 'win32' , 'win-amd64'
347346 if plat_name not in ok_plats :
348347 raise DistutilsPlatformError ("--plat-name must be one of %s" %
349348 (ok_plats ,))
@@ -372,9 +371,6 @@ def initialize(self, plat_name=None):
372371 vc_env = query_vcvarsall (VERSION , plat_spec )
373372
374373 self .__paths = vc_env ['path' ].split (os .pathsep )
375- if plat_name == 'win-arm64' :
376- self .__paths = (
377- vc_env ['path' ].replace ('HostX64' , 'HostX86' ).split (os .pathsep ))
378374 os .environ ['lib' ] = vc_env ['lib' ]
379375 os .environ ['include' ] = vc_env ['include' ]
380376
@@ -389,12 +385,6 @@ def initialize(self, plat_name=None):
389385 self .lib = self .find_exe ("lib.exe" )
390386 self .rc = self .find_exe ("rc.exe" ) # resource compiler
391387 self .mc = self .find_exe ("mc.exe" ) # message compiler
392- if plat_name == 'win-arm64' :
393- self .cc = self .cc .replace ('HostX64' , 'Hostx86' )
394- self .linker = self .linker .replace ('HostX64' , 'Hostx86' )
395- self .lib = self .lib .replace ('HostX64' , 'Hostx86' )
396- self .rc = self .rc .replace ('x64' , 'arm64' )
397- self .mc = self .mc .replace ('x64' , 'arm64' )
398388 #self.set_path_env_var('lib')
399389 #self.set_path_env_var('include')
400390
@@ -644,17 +634,6 @@ def link(self,
644634 if extra_postargs :
645635 ld_args .extend (extra_postargs )
646636
647- if get_platform () == 'win-arm64' :
648- ld_args_arm = []
649- for ld_arg in ld_args :
650- # VS tries to use the x86 linker
651- ld_arg_arm = ld_arg .replace (r'\um\x86' , r'\um\arm64' )
652- # A larger memory address is required on ARM64
653- ld_arg_arm = ld_arg_arm .replace ("0x1" , "0x10" )
654- ld_args_arm += [ld_arg_arm ]
655-
656- ld_args = list (ld_args_arm )
657-
658637 self .mkpath (os .path .dirname (output_filename ))
659638 try :
660639 self .spawn ([self .linker ] + ld_args )
0 commit comments