Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding help for M1 Mac users #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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