macOS Installation

The Shadow compiler is written in Java. It is distributed as a JAR file with directories containing the standard Shadow libraries, written in Shadow with a few LLVM source files for lower level functionality.

Shadow 0.7.5 includes better macOS support than ever. The biggest difficulty with the macOS installation is that some of the LLVM tools we need are not available as pre-compiled binaries. Further complicating the matter is that a version of LLVM is already included with many recent versions of macOS. For now, we suggest using Homebrew to get the correct versions of the needed LLVM tools. Warning: Using Homebrew to install the required LLVM tools will likely mean that two different versions of LLVM will be installed on your computer, which could have unpredictable results.


Before you can download and run Shadow, there are some prerequisites.

  1. Java 7 or higher
  2. Homebrew


Click the link below for the 0.7.5 macOS distribution of the compiler.

Once you've downloaded and extracted the files inside, running the script will use Homebrew to install LLVM 3.8 or higher, add links to shadowc and shadox into /usr/local/bin/, and add the environment variable SHADOW_HOME to your login script. Then, you can run shadowc from any terminal. Note: Installing LLVM make take a little while.

It's not absolutely necessary to use Homebrew to install LLVM. You can also download LLVM and build it yourself, if you prefer. You must build LLVM 3.8 or higher for Shadow 0.7.5 to work. Once you've built LLVM, you can use the following script instead of the one in the zip file to create the appropriate Java links to run shadowc and shadox.

SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "java -jar \"$SCRIPT_PATH/shadow.jar\"" '"$@"' > $COMPILER
chmod 0755 $COMPILER
echo "java -cp \"$SCRIPT_PATH/shadow.jar\" shadow.doctool.DocumentationTool" '"$@"' > $DOCUMENTATION
echo "export SHADOW_HOME=\"$SCRIPT_PATH\"" >> ~/.bash_profile
source ~/.bash_profile

Older Versions

Since Shadow is still in beta, these old versions are not supported in any way. They have more bugs and are harder to install. They might require earlier versions of LLVM that are harder to get a hold of.