build: add support of Darwin arm64 (Apple Silicon chipset) for native mode and cross-compile #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables users to build KomodoOcean for the
arm64-apple-darwin
triplet (Darwinaarch64
). The build is supported for both cross-compilation and native compilation for Apple Silicon chips. It was tested with the following environment:If you’ve just upgraded from an earlier OS version to macOS Sequoia, you may need to reinstall XCode Command Line Tools as described here.
Also, note that if you are building natively for arm64 macOS, the build script will prompt you to upgrade Berkeley DB to
6.2.32
. This version is still under testing, so proceed at your own risk. Be sure to back up yourwallet.dat
file before using the daemon or wallet with the updated BDB version.The
zcutil
directory now includes the following additional build scripts:build-mac.sh
- Native build for macOS x86_64. (If building on Apple Silicon, usearch -x86_64 zsh
before starting the build to switch architecture / use Rosetta). Use this when building directly on a Mac.build-mac-cross.sh
- Cross-compile on Linux for macOS x86_64. This will produceMach-O 64-bit x86_64 executable
binaries.build-mac-arm.sh
- Native build for macOS aarch64. Use this on an Apple Silicon Mac to perform a native build and obtainMach-O 64-bit executable arm64
binaries.build-mac-arm-cross.sh
- Cross-compile from Linux for macOS aarch64.build-aarch64-cross.sh
- Cross-compile for generic aarch64 targets.These scripts help streamline the build process across different architectures and operating environments.