docs
docs copied to clipboard
Adding help for M1 Mac users
By default its not possible to build on Mac M1, so you need to replace -march=native
clang arguments with -mcpu=apple-a12
Apple M1 compile
# generate env folder / clone ton source code
mkdir ~/ton-env
cd ~/ton-env
git clone --recursive https://github.com/ton-blockchain/ton.git
# Install dependent packages
brew update
brew install openssl cmake llvm
brew link openssl --force
# compile
cd ~/ton-env/
mkdir ton-bin
cd ~/ton-env/ton-bin
CC="clang -mcpu=apple-a14"
CXX="clang++ -mcpu=apple-a14"
cmake ~/ton-env/ton -DCMAKE_BUILD_TYPE=Release -DTON_ARCH= -Wno-dev
cpunumber=$(sysctl -n hw.logicalcpu)
make -j $cpunumber