# Clang & OpenMP on macOS High Sierra

**URL:** <https://pyfr.discourse.group/t/clang-openmp-on-macos-high-sierra/202>\
**Category:** General\
**Created:** [23 March 2018 19:09 UTC](https://pyfr.discourse.group/t/clang-openmp-on-macos-high-sierra/202 "2018-03-23T19:09:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zach\_Davis1](https://avatars.discourse-cdn.com/v4/letter/z/3ec8ea/32.png) [@Zach\_Davis1](https://pyfr.discourse.group/u/Zach_Davis1)\
**Post date:** [23 March 2018 19:09 UTC](https://pyfr.discourse.group/t/clang-openmp-on-macos-high-sierra/202/1 "2018-03-23T19:09:32Z")

</div>

My question may likely be addressed to Freddie. Previously, I had been running the clang-omp compiler with PyFr as the cc compiler in order to use OpenMP as a backend… Apparently clang-omp has been deprecated, since OpenMP has been rolled into the main llvm branch. I have installed libomp, and it works with Apple’s built-in clang compiler, but they have disabled the requisite driver. I can get it to work by using the frontend option which looks something like:

`clang -Xclang -fopenmp test.c -I/usr/local/include -L/usr/local/lib -lomp -o test`

Is there away to add these additional flags, so that PyFR uses them when compiling the kernel? Will simply adding them to the cc line in the \*.ini file work?

Best Regards,

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [23 March 2018 20:39 UTC](https://pyfr.discourse.group/t/clang-openmp-on-macos-high-sierra/202/2 "2018-03-23T20:39:47Z")

</div>

Hi Zach,

There is a cflags directive for this purpose. This will allow you to  
add whatever flags you need.

Regards, Freddie.
