Error compiling static library for fortran

Hi all,

I am getting an error when I try to compile the OpenMP RT with static library for Fortran.

Here my cmake line:

cmake -D LIBOMP_ENABLE_SHARED=OFF -D LIBOMP_FORTRAN_MODULES=ON ..

and here the error I get:

z_Linux_util.cpp:1344:3: error: use of undeclared identifier '__kmp_itt_reset'
   __kmp_itt_reset(); // reset ITT's global state
   ^
1 error generated.

Is there something wrong in my cmake line?

Thanks.
Simone

FYI

The call to "__kmp_itt_reset();" at line 1344 of z_Linux_util.cpp is not within:

#if USE_ITT_BUILD

#endif /* USE_ITT_BUILD */

doing that solves the problem.

Best,
Simone

Thanks for reporting this, I've just submitted the fix you suggested as https://reviews.llvm.org/D41945.

Regards,
Andrey