macOS: Compile Capstone from source
by admin on Feb.06, 2023, under News
As of now, only two architectures are relevant for macOS operating systems:
- arm64 (apple silicon)
- x86_64 (intel)
In order to compile capstone for these architectures, we proceed as follows:
git clone https://github.com/capstone-engine/capstone.git cd capstone mkdir build && cd build cmake -DCAPSTONE_ARCHITECTURE_DEFAULT=OFF -DCAPSTONE_ARM64_SUPPORT=ON -DCAPSTONE_X86_SUPPORT=ON -DCAPSTONE_X86_REDUCE=ON .. make
As described in the file COMPILE_CMAKE.TXT we first disable all architectures in order to selectively add the ones we’re looking for afterward.
The CAPSTONE_X86_REDUCE switch will reduce the binary size of the X86 part.