@@ -1399,7 +1399,6 @@ impl Build {
1399
1399
}
1400
1400
1401
1401
let mut cmd = compiler. to_command ( ) ;
1402
- let is_arm = matches ! ( target. arch, "aarch64" | "arm" ) ;
1403
1402
command_add_output_file (
1404
1403
& mut cmd,
1405
1404
& obj,
@@ -1410,7 +1409,7 @@ impl Build {
1410
1409
clang : compiler. is_like_clang ( ) ,
1411
1410
gnu : compiler. is_like_gnu ( ) ,
1412
1411
is_asm : false ,
1413
- is_arm,
1412
+ is_arm : is_arm ( target ) ,
1414
1413
} ,
1415
1414
) ;
1416
1415
@@ -1845,7 +1844,7 @@ impl Build {
1845
1844
}
1846
1845
cmd
1847
1846
} ;
1848
- let is_arm = matches ! ( target. arch , "aarch64" | "arm" ) ;
1847
+ let is_arm = is_arm ( & target) ;
1849
1848
command_add_output_file (
1850
1849
& mut cmd,
1851
1850
& obj. dst ,
@@ -2594,14 +2593,11 @@ impl Build {
2594
2593
2595
2594
fn msvc_macro_assembler ( & self ) -> Result < Command , Error > {
2596
2595
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" ,
2605
2601
} ;
2606
2602
let mut cmd = self
2607
2603
. windows_registry_find ( & target, tool)
@@ -2610,11 +2606,15 @@ impl Build {
2610
2606
for directory in self . include_directories . iter ( ) {
2611
2607
cmd. arg ( "-I" ) . arg ( & * * directory) ;
2612
2608
}
2613
- if target. arch == "aarch64" || target . arch == "arm" {
2609
+ if is_arm ( & target) {
2614
2610
if self . get_debug ( ) {
2615
2611
cmd. arg ( "-g" ) ;
2616
2612
}
2617
2613
2614
+ if target. arch == "arm64ec" {
2615
+ cmd. args ( [ "-machine" , "ARM64EC" ] ) ;
2616
+ }
2617
+
2618
2618
for ( key, value) in self . definitions . iter ( ) {
2619
2619
cmd. arg ( "-PreDefine" ) ;
2620
2620
if let Some ( ref value) = * value {
@@ -4304,6 +4304,10 @@ fn map_darwin_target_from_rust_to_compiler_architecture<'a>(target: &TargetInfo<
4304
4304
}
4305
4305
}
4306
4306
4307
+ fn is_arm ( target : & TargetInfo < ' _ > ) -> bool {
4308
+ matches ! ( target. arch, "aarch64" | "arm64ec" | "arm" )
4309
+ }
4310
+
4307
4311
#[ derive( Clone , Copy , PartialEq ) ]
4308
4312
enum AsmFileExt {
4309
4313
/// `.asm` files. On MSVC targets, we assume these should be passed to MASM
0 commit comments