(Ad revenue is used to cover hosting costs and nice little presents for my little daugther.)

Exploration of LLVM: Install LLVM llc and opt on OS X.
Jan 5, 2016


In the last post, I showed he LLVM static compiler llc to you, but I forget to mention how I got the llvm tools running on my OS X. In this post I'll show you how to install llc and the LLVM optimizer opt on your OS X system easily accessible in your $PATH.

First, let's install llvm with brew:

brew install llvm

After the installation you should see a summary like this:

==> Summary
  /usr/local/Cellar/llvm/3.6.2: 811 files, 282M

Use this path link to the llvm executables for llc and opt:

sudo ln -s /usr/local/Cellar/llvm/3.6.2/bin/opt /usr/bin/opt
sudo ln -s /usr/local/Cellar/llvm/3.6.2/bin/llc /usr/bin/llc

Now you have the tools available in your command line.