<div dir="ltr"><div>Hi,</div><div><br></div><div>I need to install CLang/LLVM 3.7.0 with OpenMP support (libomp), and for various reasons I need to do it with the following configuration :</div><div><br></div><div>* llvm + compiler-rt + openmp installed in some custom folder</div><div>* cfe + clang-tools-extra (depending on the llvm above) as a separate installation somewhere else</div><div><br></div><div>Up to now I wasn't able to configure the build to generate a proper support for OpenMP, as it seems the compiler paths are not set up correctly to find the 'omp.h' header when "-fopenmp=libomp" option is passed:</div><div><br></div><div>  $ clang++ -fopenmp=libomp main.cpp<br></div><div>  main.cpp:1:10: fatal error: 'omp.h' file not found</div><div>  #include "omp.h"</div><div>           ^</div><div>  1 error generated.</div><div><br></div><div>If I add the include path explicitly everything works as expected:</div><div><br></div><div>  $ clang++ -I<llvm-install-root>/lib/clang/3.7.0/include  main.cpp -fopenmp=libomp</div><div>  $ ./a.out </div><div>  Hello from thread 0 of 4</div><div>  Hello from thread 1 of 4</div><div>  Hello from thread 3 of 4</div><div>  Hello from thread 2 of 4</div><div><br></div><div>Is there any option or definition I overlooked in the documentation that will correctly configure clang to add the "omp.h" include path among the defaults if "-fopenmp=libomp" is given?</div><div><br></div><div>Thanks,</div><div>Massimiliano</div></div>