Add arm64 macOS cross-compilation instructions. (#71568)
authorJuan Hoyos <juan.hoyos@microsoft.com>
Sat, 2 Jul 2022 00:56:54 +0000 (17:56 -0700)
committerGitHub <noreply@github.com>
Sat, 2 Jul 2022 00:56:54 +0000 (17:56 -0700)
docs/workflow/building/coreclr/cross-building.md

index 2705ba3..6753941 100644 (file)
@@ -19,6 +19,12 @@ Build using "arm" as the architecture. For example:
 
     C:\runtime> src\coreclr\build-runtime.cmd -arm -debug
 
+Cross Compilation for ARM64 on macOS
+================================================
+
+The toolset required to do native compilation described in [macOS requirements](https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/macos-requirements.md) has cross compilation capabilities with no additional installs required. The only needed change is to use the `-cross` flag in the build scripts. For example, a release CoreCLR runtime that targets ARM64 can be built using the following commandline from the root of the repo:
+
+    ./build.sh -subset clr.runtime -c release -cross -arch arm64 /p:CrossBuild=true
 
 Cross Compilation for ARM, ARM64 or x86 on Linux
 ================================================