Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Adding help for M1 Mac users#37

Open
zavidnyi wants to merge 1 commit into
ton-blockchain:masterfrom
zavidnyi:master
Open

Adding help for M1 Mac users#37
zavidnyi wants to merge 1 commit into
ton-blockchain:masterfrom
zavidnyi:master

Conversation

@zavidnyi

Copy link
Copy Markdown

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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants