@@ -1399,7 +1399,6 @@ impl Build {
13991399        } 
14001400
14011401        let  mut  cmd = compiler. to_command ( ) ; 
1402-         let  is_arm = matches ! ( target. arch,  "aarch64"  | "arm" ) ; 
14031402        command_add_output_file ( 
14041403            & mut  cmd, 
14051404            & obj, 
@@ -1410,7 +1409,7 @@ impl Build {
14101409                clang :  compiler. is_like_clang ( ) , 
14111410                gnu :  compiler. is_like_gnu ( ) , 
14121411                is_asm :  false , 
1413-                 is_arm, 
1412+                 is_arm :   is_arm ( target ) , 
14141413            } , 
14151414        ) ; 
14161415
@@ -1845,7 +1844,7 @@ impl Build {
18451844            } 
18461845            cmd
18471846        } ; 
1848-         let  is_arm = matches ! ( target. arch ,   "aarch64"  |  "arm" ) ; 
1847+         let  is_arm = is_arm ( & target) ; 
18491848        command_add_output_file ( 
18501849            & mut  cmd, 
18511850            & obj. dst , 
@@ -2594,14 +2593,11 @@ impl Build {
25942593
25952594    fn  msvc_macro_assembler ( & self )  -> Result < Command ,  Error >  { 
25962595        let  target = self . get_target ( ) ?; 
2597-         let  tool = if  target. arch  == "x86_64"  { 
2598-             "ml64.exe" 
2599-         }  else  if  target. arch  == "arm"  { 
2600-             "armasm.exe" 
2601-         }  else  if  target. arch  == "aarch64"  { 
2602-             "armasm64.exe" 
2603-         }  else  { 
2604-             "ml.exe" 
2596+         let  tool = match  target. arch  { 
2597+             "x86_64"  => "ml64.exe" , 
2598+             "arm"  => "armasm.exe" , 
2599+             "aarch64"  | "arm64ec"  => "armasm64.exe" , 
2600+             _ => "ml.exe" , 
26052601        } ; 
26062602        let  mut  cmd = self 
26072603            . windows_registry_find ( & target,  tool) 
@@ -2610,7 +2606,7 @@ impl Build {
26102606        for  directory in  self . include_directories . iter ( )  { 
26112607            cmd. arg ( "-I" ) . arg ( & * * directory) ; 
26122608        } 
2613-         if  target. arch  ==  "aarch64"  || target . arch  ==  "arm"  { 
2609+         if  is_arm ( & target)  { 
26142610            if  self . get_debug ( )  { 
26152611                cmd. arg ( "-g" ) ; 
26162612            } 
@@ -4304,6 +4300,10 @@ fn map_darwin_target_from_rust_to_compiler_architecture<'a>(target: &TargetInfo<
43044300    } 
43054301} 
43064302
4303+ fn  is_arm ( target :  & TargetInfo < ' _ > )  -> bool  { 
4304+     matches ! ( target. arch,  "aarch64"  | "arm64ec"  | "arm" ) 
4305+ } 
4306+ 
43074307#[ derive( Clone ,  Copy ,  PartialEq ) ]  
43084308enum  AsmFileExt  { 
43094309    /// `.asm` files. On MSVC targets, we assume these should be passed to MASM 
0 commit comments