Skip to content

Conversation

@zavidnyi
Copy link

By default its not possible to build on Mac M1, so you need to replace -march=native clang arguments with -mcpu=apple-a12

By default its not possible to build on Mac M1, so you need to replace ```-march=native``` clang arguments with ```-mcpu=apple-a12```
@zavidnyi zavidnyi changed the title Adding help for M1 Max users Adding help for M1 Mac users Apr 28, 2022
@awesome-doge
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants