[cfe-dev] Clang/LLVM OpenMP program not spawning threads

Andrey Bokhanko andreybokhanko at gmail.com
Tue Jul 28 03:12:16 PDT 2015


On Tue, Jul 28, 2015 at 12:37 PM, David Chisnall
<David.Chisnall at cl.cam.ac.uk> wrote:
> On 27 Jul 2015, at 23:19, Jaime Arteaga <jandres742 at gmail.com> wrote:
>>
>> clang -lomp -I/.../openmp/runtime/exports/common/include -L/.../openmp/runtime/exports/lin_32e/lib ./test-openmp.c -o ./test-openmp
>
> Doesn’t this need -fopenmp?

-fopenmp alone is not enough, since OpenMP support (that relies on
Intel OMP API) is enabled *only* if compiler is specifically directed
to target libomp. Thus, -fopenmp=libomp is required.

Yours,
Andrey




More information about the cfe-dev mailing list