On March 2, 2026 2:49:53 AM CST, Florian Weimer <[email protected]> wrote:
>* Dima Pasechnik:
>
>> Since a while, Apple clang allows OpenMP (from llvm project, GNU OpenMP
>> doesn't work) if one supplies an option "-Xpreprocessor -fopenmp".
>> The (unprefixed) option "-fopenmp" is not understood, and leads to an
>> error.
>
>Is this actually documented as supported by Apple?  I don't think so;
>this doesn't show any results: <https://developer.apple.com/search/?q=openmp>
>
>I'm not sure it's a good idea to automatically enable compiler flags
>just because they do not immediately cause compilation to fail.
>Presumably there's a reason why this feature is somewhat hidden in the
>Apple compiler.

It is not unusual for commercial vendors to leave features undocumented. They 
say that one of  the reasons behind is that Apple wants developers to use their 
own parallelism tool called Grand Unified Dispatch.

The use of this flag is documented by a number of opensource projects, e.g. by 
R Project. Meson supports this out of the box,
in the sense that you can specify OpenMP support in their meson.build config 
files, and it will enable OpenMP for your build with Apple Clang. Homebrew 
supports this. Etc etc.

Hope this explains.
Dima

>
>Thanks,
>Florian
>


Reply via email to