@@ -462,6 +462,11 @@ function Start-BuildNativeUnixBinaries {
462
462
Start-NativeExecution { cmake - DCMAKE_TOOLCHAIN_FILE= " ./arm64.toolchain.cmake" . }
463
463
Start-NativeExecution { make - j }
464
464
}
465
+ elseif ($IsMacOS ) {
466
+ Start-NativeExecution { cmake - DCMAKE_TOOLCHAIN_FILE= " ./macos.toolchain.cmake" . }
467
+ Start-NativeExecution { make - j }
468
+ Start-NativeExecution { ctest -- verbose }
469
+ }
465
470
else {
466
471
Start-NativeExecution { cmake - DCMAKE_BUILD_TYPE= Debug . }
467
472
Start-NativeExecution { make - j }
@@ -774,6 +779,7 @@ function Start-PSBuild {
774
779
# If this parameter is not provided it will get determined automatically.
775
780
[ValidateSet (" win7-x64" ,
776
781
" win7-x86" ,
782
+ " osx-arm64" ,
777
783
" osx-x64" ,
778
784
" linux-x64" ,
779
785
" linux-arm" ,
@@ -1087,6 +1093,7 @@ function New-PSOptions {
1087
1093
[ValidateSet (" " ,
1088
1094
" win7-x86" ,
1089
1095
" win7-x64" ,
1096
+ " osx-arm64" ,
1090
1097
" osx-x64" ,
1091
1098
" linux-x64" ,
1092
1099
" linux-arm" ,
@@ -1139,7 +1146,12 @@ function New-PSOptions {
1139
1146
if ($Environment.IsLinux ) {
1140
1147
$Runtime = " linux-x64"
1141
1148
} elseif ($Environment.IsMacOS ) {
1142
- $Runtime = " osx-x64"
1149
+ if ($PSVersionTable.OS.Contains (' ARM64' )) {
1150
+ $Runtime = " osx-arm64"
1151
+ }
1152
+ else {
1153
+ $Runtime = " osx-x64"
1154
+ }
1143
1155
} else {
1144
1156
$RID = dotnet -- info | ForEach-Object {
1145
1157
if ($_ -match " RID" ) {
@@ -2540,6 +2552,7 @@ function Start-CrossGen {
2540
2552
[Parameter (Mandatory = $true )]
2541
2553
[ValidateSet (" win7-x86" ,
2542
2554
" win7-x64" ,
2555
+ " osx-arm64" ,
2543
2556
" osx-x64" ,
2544
2557
" linux-x64" ,
2545
2558
" linux-arm" ,
@@ -2610,6 +2623,8 @@ function Start-CrossGen {
2610
2623
throw " crossgen is not available for 'linux-arm64'"
2611
2624
} elseif ($Environment.IsLinux ) {
2612
2625
" linux-x64"
2626
+ } elseif ($Runtime -eq " osx-arm64" ) {
2627
+ " osx-arm64"
2613
2628
} elseif ($Environment.IsMacOS ) {
2614
2629
" osx-x64"
2615
2630
}
0 commit comments