Skip to content

Instantly share code, notes, and snippets.

@tranma
Created August 11, 2016 01:29
Show Gist options
  • Save tranma/a901ea44fccec7b4d86c6406a05344d9 to your computer and use it in GitHub Desktop.
Save tranma/a901ea44fccec7b4d86c6406a05344d9 to your computer and use it in GitHub Desktop.
# this doesn't work with 3.6
# also the homebrew formula won't work, missing the dylib
wget http://llvm.org/releases/3.5.0/llvm-3.5.0.src.tar.xz
wget http://llvm.org/releases/3.5.0/cfe-3.5.0.src.tar.xz
wget http://llvm.org/releases/3.5.0/compiler-rt-3.5.0.src.tar.xz
tar xvf llvm-3.5.0.src.tar.xz
cd llvm-3.5.0.src/tools
tar xvf ../../cfe-3.5.0.src.tar.xz
mv cfe-3.5.0.src clang
cd ..
cd projects
tar xvf ../../compiler-rt-3.5.0.src.tar.xz
mv compiler-rt-3.5.0.src/ compiler-rt
cd ..
./configure --enable-optimized --prefix=/usr/local
make -j4
make install
@tranma
Copy link
Author

tranma commented Aug 11, 2016

savagely replacing gcc

ln -s /usr/local/bin/clang ~/bin/gcc
PATH=~/bin:$PATH ./foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment