@@ -462,6 +462,11 @@ function Start-BuildNativeUnixBinaries {
462462 Start-NativeExecution { cmake - DCMAKE_TOOLCHAIN_FILE= " ./arm64.toolchain.cmake" . }
463463 Start-NativeExecution { make - j }
464464 }
465+ elseif ($IsMacOS ) {
466+ Start-NativeExecution { cmake - DCMAKE_TOOLCHAIN_FILE= " ./macos.toolchain.cmake" . }
467+ Start-NativeExecution { make - j }
468+ Start-NativeExecution { ctest -- verbose }
469+ }
465470 else {
466471 Start-NativeExecution { cmake - DCMAKE_BUILD_TYPE= Debug . }
467472 Start-NativeExecution { make - j }
@@ -774,6 +779,7 @@ function Start-PSBuild {
774779 # If this parameter is not provided it will get determined automatically.
775780 [ValidateSet (" win7-x64" ,
776781 " win7-x86" ,
782+ " osx-arm64" ,
777783 " osx-x64" ,
778784 " linux-x64" ,
779785 " linux-arm" ,
@@ -1087,6 +1093,7 @@ function New-PSOptions {
10871093 [ValidateSet (" " ,
10881094 " win7-x86" ,
10891095 " win7-x64" ,
1096+ " osx-arm64" ,
10901097 " osx-x64" ,
10911098 " linux-x64" ,
10921099 " linux-arm" ,
@@ -1139,7 +1146,12 @@ function New-PSOptions {
11391146 if ($Environment.IsLinux ) {
11401147 $Runtime = " linux-x64"
11411148 } 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+ }
11431155 } else {
11441156 $RID = dotnet -- info | ForEach-Object {
11451157 if ($_ -match " RID" ) {
@@ -2540,6 +2552,7 @@ function Start-CrossGen {
25402552 [Parameter (Mandatory = $true )]
25412553 [ValidateSet (" win7-x86" ,
25422554 " win7-x64" ,
2555+ " osx-arm64" ,
25432556 " osx-x64" ,
25442557 " linux-x64" ,
25452558 " linux-arm" ,
@@ -2610,6 +2623,8 @@ function Start-CrossGen {
26102623 throw " crossgen is not available for 'linux-arm64'"
26112624 } elseif ($Environment.IsLinux ) {
26122625 " linux-x64"
2626+ } elseif ($Runtime -eq " osx-arm64" ) {
2627+ " osx-arm64"
26132628 } elseif ($Environment.IsMacOS ) {
26142629 " osx-x64"
26152630 }
0 commit comments