Skip to content

Instantly share code, notes, and snippets.

@bitsnaps
Created September 15, 2020 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitsnaps/2afdd6d11132fac37ec90545cf94c887 to your computer and use it in GitHub Desktop.
Save bitsnaps/2afdd6d11132fac37ec90545cf94c887 to your computer and use it in GitHub Desktop.
Install LLVM OpenMP on Mac
# Original source: https://openmp.llvm.org/
# 1- Clone the repo (~ 1Gb)
git clone --depth 1 https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build && cd build
# 2- Make sure clang & clang++ are both installed (I believe xcode should be installed as well), you'll some space (~ 16Gb)
cmake ../llvm -DLLVM_ENABLE_PROJECTS=openmp -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++)
make
# 3- (Optional) Running tests
make check-all
# 4- Add binaries to the path (e.g. ~/.bash_profile):
#export LLVM_HOME=/path/to/llvm-project/build
#export PATH=$PATH:$LLVM_HOME/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment