$ clang -v
Manual XNU Building
NOTE: these steps can be done from either an Apple silicon Mac or an Intel Mac. The Xcode toolchain will happily cross-compile for the architecture(s) you specify!
Download and Install Xcode
Make sure you have at least Xcode 12.4 installed. You can install it via the App Store, or by manual download here:
https://developer.apple.com/download/more/
NOTE: for older versions of macOS, you may need older versions of Xcode which are only available via download from developer.apple.com. You need a developer account to download from that site.
Download and Install the KDK