How to install clang-format 5.0.0 on Mac
by Hidenori
- Download Clang Version 5.0.0 for macOS (.sig). (Scroll down a bit, and you’ll see 5.0.0.)
- Unzip it by clicking it.
cd ~/Downloads/clang+llvm-5.0.0-x86_64-apple-darwin
.- Run
ls
and confirm that you seebin
,include
,lib
,libexec
andshare
. - Run
sudo cp -R * /usr/local/
.- NOTE: In retrospect, I think it’s better to do
sudo cp -R bin/clang-format /usr/local/bin/
. - It is because I couldn’t build stellar-core after doing this step.
- I’m not certain if it was because of this, but I think it’s just better to only move clang-format.
- I actually realloy don’t know which one is better. If I don’t move everything, there might be some dependency issues.
- NOTE: In retrospect, I think it’s better to do
- Run
clang-format --version
. - Most likely, macOS will complain that the program can’t be trusted.
Open System Preferences and go to Security & Privacy.
You will probably see something about
clang-format
there. - Once you are done with that, go back to the terminal, and run
clang-format --version
. - Hopefully, you will see
clang-format version 5.0.0 (tags/RELEASE_500/final)
.
Subscribe via RSS