[llvm-dev] OpenMP Error in Clang

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Wed May 27 03:44:08 PDT 2020


I don't see what the difference is between the two command lines is. However,

1. the option is "clang -fopenmp" (without -Xclang, which is for
options for the -cc1 invocation)

2. omp.h is part of the openmp subproject, it must be enabled
(-DLLVM_ENABLE_PROJECTS=openmp) and omp.h found in the include path.

Michael


Am Di., 26. Mai 2020 um 20:29 Uhr schrieb Chatterjee, Bodhisatwa via
llvm-dev <llvm-dev at lists.llvm.org>:
>
> Hello,
>
> I am getting the following error while trying to build a benchmark with a custom function pass:
>
> clang  -Xclang -fopenmp=libomp -Xclang -load -Xclang my_lib.so file.c
>
>
>  error: unknown argument: '-fopenmp=libomp'
>
> If I use this instead:
>
> clang  -Xclang -fopenmp=libomp -Xclang -load -Xclang my_lib.so file.c
>
> I get the error:  fatal error: 'omp.h' file not found
>
> I am not sure where the problem is, especially since I have used OpenMP applications with llvm before.
>
> Thanks,
> Bodhi
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list