@@ -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" | "arm64ec" | "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" | "arm64ec" | "arm" ) ;
1847
+ let is_arm = is_arm ( & target) ;
1849
1848
command_add_output_file (
1850
1849
& mut cmd,
1851
1850
& obj. dst ,
@@ -2607,11 +2606,15 @@ impl Build {
2607
2606
for directory in self . include_directories . iter ( ) {
2608
2607
cmd. arg ( "-I" ) . arg ( & * * directory) ;
2609
2608
}
2610
- if matches ! ( target. arch , "aarch64" | "arm64ec" | "arm" ) {
2609
+ if is_arm ( & target) {
2611
2610
if self . get_debug ( ) {
2612
2611
cmd. arg ( "-g" ) ;
2613
2612
}
2614
2613
2614
+ if target. arch == "arm64ec" {
2615
+ cmd. args ( [ "-machine" , "ARM64EC" ] ) ;
2616
+ }
2617
+
2615
2618
for ( key, value) in self . definitions . iter ( ) {
2616
2619
cmd. arg ( "-PreDefine" ) ;
2617
2620
if let Some ( ref value) = * value {
@@ -4301,6 +4304,10 @@ fn map_darwin_target_from_rust_to_compiler_architecture<'a>(target: &TargetInfo<
4301
4304
}
4302
4305
}
4303
4306
4307
+ fn is_arm ( target : & TargetInfo < ' _ > ) -> bool {
4308
+ matches ! ( target. arch, "aarch64" | "arm64ec" | "arm" )
4309
+ }
4310
+
4304
4311
#[ derive( Clone , Copy , PartialEq ) ]
4305
4312
enum AsmFileExt {
4306
4313
/// `.asm` files. On MSVC targets, we assume these should be passed to MASM
0 commit comments