Homebrew is a command line tool for MacOS for installing open source software. If you do not already have it, install it here:
Now install the llvm suite of tools with these two commands:
brew install lld llvm
brew link --force llvm
If clang
runs when you type make
on an assignment but always
fails to build assembly files, you may have missed a step when
you installed Homebrew: it prints out some instructions that are
easy to miss:
clang
preinstalledbrew
commands above install a newer, more complete versionIf this is happening, try running this command (this is what Homebrew told you to run but you may have missed):
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> $HOME/.zprofile
Then close your terminal/shell window and re-open it and try running
make
again.